Skip to content
Snippets Groups Projects
Commit 4569953e authored by Andreas Fischer's avatar Andreas Fischer
Browse files

Clean up test table in Connection Test to prevent unnecessary failures.

parent bedc4664
No related branches found
No related tags found
No related merge requests found
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment