diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 16:04:57 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2017-08-09 16:04:57 +0200 |
commit | 26bf0ca9d42150efd2cd42d624d863908769f510 (patch) | |
tree | c5675d7ff28ea9d8eebf5a93f471ad98d05f0830 /tests | |
parent | db27bbf90d916193f4884f96570811913c2b8b9e (diff) | |
download | nextcloud-server-26bf0ca9d42150efd2cd42d624d863908769f510.tar.gz nextcloud-server-26bf0ca9d42150efd2cd42d624d863908769f510.zip |
Fix RepairMimeTypeTest
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/Repair/RepairMimeTypesTest.php | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/lib/Repair/RepairMimeTypesTest.php b/tests/lib/Repair/RepairMimeTypesTest.php index f30bbdf7d11..6f3ed5ce318 100644 --- a/tests/lib/Repair/RepairMimeTypesTest.php +++ b/tests/lib/Repair/RepairMimeTypesTest.php @@ -54,16 +54,22 @@ class RepairMimeTypesTest extends \Test\TestCase { protected function tearDown() { $this->storage->getCache()->clear(); - $sql = 'DELETE FROM `*PREFIX*storages` WHERE `id` = ?'; - \OC_DB::executeAudited($sql, [$this->storage->getId()]); + + $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); + $qb->delete('storages') + ->where($qb->expr()->eq('id', $qb->createNamedParameter($this->storage->getId()))); + $qb->execute(); + $this->clearMimeTypes(); parent::tearDown(); } private function clearMimeTypes() { - $sql = 'DELETE FROM `*PREFIX*mimetypes`'; - \OC_DB::executeAudited($sql); + $qb = \OC::$server->getDatabaseConnection()->getQueryBuilder(); + $qb->delete('mimetypes'); + $qb->execute(); + $this->mimetypeLoader->reset(); } |