summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/lib/db/connection.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/lib/db/connection.php b/tests/lib/db/connection.php
index 070c75db55d..720b448d0fb 100644
--- a/tests/lib/db/connection.php
+++ b/tests/lib/db/connection.php
@@ -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();