diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-06 12:34:19 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-07-21 15:25:47 +0200 |
commit | de348180ae257017a9a2af05dac72286bf262bed (patch) | |
tree | 3fe07523249ca6a6e91defcff781b86be031b98c /apps/encryption/tests | |
parent | 1bfb944d515c88f915739c3b920d39d6da200d29 (diff) | |
download | nextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.tar.gz nextcloud-server-de348180ae257017a9a2af05dac72286bf262bed.zip |
Use the public interface and our method instead of the doctrine thing
Diffstat (limited to 'apps/encryption/tests')
-rw-r--r-- | apps/encryption/tests/lib/MigrationTest.php | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/encryption/tests/lib/MigrationTest.php b/apps/encryption/tests/lib/MigrationTest.php index 6742de574bf..c0d8f081342 100644 --- a/apps/encryption/tests/lib/MigrationTest.php +++ b/apps/encryption/tests/lib/MigrationTest.php @@ -288,14 +288,14 @@ class MigrationTest extends \Test\TestCase { // delete default values set by the encryption app during initialization - /** @var \OC\DB\Connection $connection */ + /** @var \OCP\IDBConnection $connection */ $connection = \OC::$server->getDatabaseConnection(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->delete('`*PREFIX*appconfig`') ->where($query->expr()->eq('`appid`', ':appid')) ->setParameter('appid', 'encryption'); $query->execute(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->delete('`*PREFIX*preferences`') ->where($query->expr()->eq('`appid`', ':appid')) ->setParameter('appid', 'encryption'); @@ -368,9 +368,9 @@ class MigrationTest extends \Test\TestCase { } public function verifyDB($table, $appid, $expected) { - /** @var \OC\DB\Connection $connection */ + /** @var \OCP\IDBConnection $connection */ $connection = \OC::$server->getDatabaseConnection(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->select('`appid`') ->from($table) ->where($query->expr()->eq('`appid`', ':appid')) @@ -392,9 +392,9 @@ class MigrationTest extends \Test\TestCase { // check results - /** @var \OC\DB\Connection $connection */ + /** @var \OCP\IDBConnection $connection */ $connection = \OC::$server->getDatabaseConnection(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->select('*') ->from('`*PREFIX*filecache`'); $result = $query->execute(); @@ -411,17 +411,17 @@ class MigrationTest extends \Test\TestCase { } public function prepareFileCache() { - /** @var \OC\DB\Connection $connection */ + /** @var \OCP\IDBConnection $connection */ $connection = \OC::$server->getDatabaseConnection(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->delete('`*PREFIX*filecache`'); $query->execute(); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $result = $query->select('`fileid`') ->from('`*PREFIX*filecache`') ->setMaxResults(1)->execute()->fetchAll(); $this->assertEmpty($result); - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $query->insert('`*PREFIX*filecache`') ->values( array( @@ -442,7 +442,7 @@ class MigrationTest extends \Test\TestCase { $query->execute() ); } - $query = $connection->createQueryBuilder(); + $query = $connection->getQueryBuilder(); $result = $query->select('`fileid`') ->from('`*PREFIX*filecache`') ->execute()->fetchAll(); |