summaryrefslogtreecommitdiffstats
path: root/tests/Integration/IntegrationTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Integration/IntegrationTest.php')
-rw-r--r--tests/Integration/IntegrationTest.php11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/Integration/IntegrationTest.php b/tests/Integration/IntegrationTest.php
index fb39dfd7a..c14d3007a 100644
--- a/tests/Integration/IntegrationTest.php
+++ b/tests/Integration/IntegrationTest.php
@@ -19,7 +19,7 @@ use OCA\News\Db\Item;
use OCP\AppFramework\Db\Entity;
use OCP\AppFramework\IAppContainer;
-use OCP\IDb;
+use OCP\IDBConnection;
use OCP\IUserSession;
use OCP\IUserManager;
@@ -32,7 +32,7 @@ use OCA\News\Db\ItemMapper;
use OCA\News\Db\FolderMapper;
-abstract class IntegrationTest extends PHPUnit_Framework_TestCase {
+abstract class IntegrationTest extends \Test\TestCase {
protected $user = 'test';
protected $userPassword = 'test';
@@ -162,8 +162,7 @@ abstract class IntegrationTest extends PHPUnit_Framework_TestCase {
$userManager = $this->container->query(IUserManager::class);
$userManager->createUser($user, $password);
- $session = $this->container->query(IUserSession::class);
- $session->login($user, $password);
+ $this->loginAsUser($user);
}
/**
@@ -192,9 +191,9 @@ abstract class IntegrationTest extends PHPUnit_Framework_TestCase {
'DELETE FROM `*PREFIX*news_folders` WHERE `user_id` = ?'
];
- $db = $this->container->query(IDb::class);
+ $db = $this->container->query(IDBConnection::class);
foreach ($sql as $query) {
- $db->prepareQuery($query)->execute([$user]);
+ $db->prepare($query)->execute([$user]);
}
}