Clean up test table in Connection Test to prevent unnecessary failures.
This commit is contained in:
parent
bedc4664e4
commit
4569953e5c
|
@ -18,6 +18,25 @@ class Connection extends \Test\TestCase {
|
|||
*/
|
||||
private $connection;
|
||||
|
||||
public static function setUpBeforeClass()
|
||||
{
|
||||
self::dropTestTable();
|
||||
parent::setUpBeforeClass();
|
||||
}
|
||||
|
||||
public static function tearDownAfterClass()
|
||||
{
|
||||
self::dropTestTable();
|
||||
parent::tearDownAfterClass();
|
||||
}
|
||||
|
||||
protected static function dropTestTable()
|
||||
{
|
||||
if (\OC::$server->getConfig()->getSystemValue('dbtype', 'sqlite') !== 'oci') {
|
||||
\OC_DB::dropTable('table');
|
||||
}
|
||||
}
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->connection = \OC::$server->getDatabaseConnection();
|
||||
|
|
Loading…
Reference in New Issue