summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2016-08-15 16:43:22 +0200
committerLukas Reschke <lukas@statuscode.ch>2016-08-15 16:43:22 +0200
commit7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae (patch)
tree8472e73eb69f8495405231d44e1d580cbd0942bd
parent8a7a0f328746230dd896ccc53b3ada271a91b930 (diff)
downloadnextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.tar.gz
nextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.zip
Use MockBuilder instead of createMock
CI uses an older PHPUnit
-rw-r--r--apps/encryption/tests/Settings/AdminTest.php12
-rw-r--r--apps/federatedfilesharing/tests/Settings/AdminTest.php2
-rw-r--r--apps/federation/tests/Settings/AdminTest.php2
-rw-r--r--apps/files/tests/Settings/AdminTest.php4
-rw-r--r--apps/files_external/tests/Settings/AdminTest.php8
-rw-r--r--apps/files_external/tests/Settings/SectionTest.php2
-rw-r--r--apps/theming/tests/Settings/AdminTest.php8
-rw-r--r--apps/theming/tests/Settings/SectionTest.php2
-rw-r--r--apps/updatenotification/tests/Controller/AdminControllerTest.php16
-rw-r--r--apps/user_ldap/tests/Settings/AdminTest.php2
-rw-r--r--apps/user_ldap/tests/Settings/SectionTest.php2
-rw-r--r--tests/Settings/Controller/AdminSettingsControllerTest.php8
-rw-r--r--tests/Settings/Controller/CheckSetupControllerTest.php2
-rw-r--r--tests/lib/Settings/Admin/AdditionalTest.php2
-rw-r--r--tests/lib/Settings/Admin/EncryptionTest.php4
-rw-r--r--tests/lib/Settings/Admin/LoggingTest.php2
-rw-r--r--tests/lib/Settings/Admin/ServerTest.php8
-rw-r--r--tests/lib/Settings/Admin/SharingTest.php2
-rw-r--r--tests/lib/Settings/Admin/TipsTricksTest.php2
-rw-r--r--tests/lib/Settings/ManagerTest.php36
20 files changed, 63 insertions, 63 deletions
diff --git a/apps/encryption/tests/Settings/AdminTest.php b/apps/encryption/tests/Settings/AdminTest.php
index 5b0b577e058..93896585dad 100644
--- a/apps/encryption/tests/Settings/AdminTest.php
+++ b/apps/encryption/tests/Settings/AdminTest.php
@@ -52,12 +52,12 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->createMock('\OCP\IL10N');
- $this->logger = $this->createMock('\OCP\ILogger');
- $this->userSession = $this->createMock('\OCP\IUserSession');
- $this->config = $this->createMock('\OCP\IConfig');
- $this->userManager = $this->createMock('\OCP\IUserManager');
- $this->session = $this->createMock('\OCP\ISession');
+ $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->logger = $this->getMockBuilder('\OCP\ILogger')->getMock();
+ $this->userSession = $this->getMockBuilder('\OCP\IUserSession')->getMock();
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
+ $this->session = $this->getMockBuilder('\OCP\ISession')->getMock();
$this->admin = new Admin(
$this->l,
diff --git a/apps/federatedfilesharing/tests/Settings/AdminTest.php b/apps/federatedfilesharing/tests/Settings/AdminTest.php
index e082e7bff23..60fadca7b56 100644
--- a/apps/federatedfilesharing/tests/Settings/AdminTest.php
+++ b/apps/federatedfilesharing/tests/Settings/AdminTest.php
@@ -35,7 +35,7 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->federatedShareProvider = $this->createMock('\OCA\FederatedFileSharing\FederatedShareProvider');
+ $this->federatedShareProvider = $this->getMockBuilder('\OCA\FederatedFileSharing\FederatedShareProvider')->disableOriginalConstructor()->getMock();
$this->admin = new Admin(
$this->federatedShareProvider
);
diff --git a/apps/federation/tests/Settings/AdminTest.php b/apps/federation/tests/Settings/AdminTest.php
index 78cb7201dcd..758bda6bc5e 100644
--- a/apps/federation/tests/Settings/AdminTest.php
+++ b/apps/federation/tests/Settings/AdminTest.php
@@ -36,7 +36,7 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->trustedServers = $this->createMock('\OCA\Federation\TrustedServers');
+ $this->trustedServers = $this->getMockBuilder('\OCA\Federation\TrustedServers')->disableOriginalConstructor()->getMock();
$this->admin = new Admin(
$this->trustedServers
);
diff --git a/apps/files/tests/Settings/AdminTest.php b/apps/files/tests/Settings/AdminTest.php
index c536377af93..1ab8a992879 100644
--- a/apps/files/tests/Settings/AdminTest.php
+++ b/apps/files/tests/Settings/AdminTest.php
@@ -40,8 +40,8 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->iniGetWrapper = $this->createMock('\bantu\IniGetWrapper\IniGetWrapper');
- $this->request = $this->createMock('\OCP\IRequest');
+ $this->iniGetWrapper = $this->getMockBuilder('\bantu\IniGetWrapper\IniGetWrapper')->disableOriginalConstructor()->getMock();
+ $this->request = $this->getMockBuilder('\OCP\IRequest')->getMock();
$this->admin = new Admin(
$this->iniGetWrapper,
$this->request
diff --git a/apps/files_external/tests/Settings/AdminTest.php b/apps/files_external/tests/Settings/AdminTest.php
index 1918e800c9b..fdf9680e7c3 100644
--- a/apps/files_external/tests/Settings/AdminTest.php
+++ b/apps/files_external/tests/Settings/AdminTest.php
@@ -45,10 +45,10 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->encryptionManager = $this->createMock('\OCP\Encryption\IManager');
- $this->globalStoragesService = $this->createMock('\OCA\Files_External\Service\GlobalStoragesService');
- $this->backendService = $this->createMock('\OCA\Files_External\Service\BackendService');
- $this->globalAuth = $this->createMock('\OCA\Files_External\Lib\Auth\Password\GlobalAuth');
+ $this->encryptionManager = $this->getMockBuilder('\OCP\Encryption\IManager')->getMock();
+ $this->globalStoragesService = $this->getMockBuilder('\OCA\Files_External\Service\GlobalStoragesService')->disableOriginalConstructor()->getMock();
+ $this->backendService = $this->getMockBuilder('\OCA\Files_External\Service\BackendService')->disableOriginalConstructor()->getMock();
+ $this->globalAuth = $this->getMockBuilder('\OCA\Files_External\Lib\Auth\Password\GlobalAuth')->disableOriginalConstructor()->getMock();
$this->admin = new Admin(
$this->encryptionManager,
diff --git a/apps/files_external/tests/Settings/SectionTest.php b/apps/files_external/tests/Settings/SectionTest.php
index 9ab456fe307..b5dfb28b382 100644
--- a/apps/files_external/tests/Settings/SectionTest.php
+++ b/apps/files_external/tests/Settings/SectionTest.php
@@ -35,7 +35,7 @@ class SectionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->createMock('\OCP\IL10N');
+ $this->l = $this->getMockBuilder('\OCP\IL10N')->disableOriginalConstructor()->getMock();
$this->section = new Section(
$this->l
diff --git a/apps/theming/tests/Settings/AdminTest.php b/apps/theming/tests/Settings/AdminTest.php
index ff42c6997a6..18c2064e8ce 100644
--- a/apps/theming/tests/Settings/AdminTest.php
+++ b/apps/theming/tests/Settings/AdminTest.php
@@ -45,10 +45,10 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
- $this->l10n = $this->createMock('\OCP\IL10N');
- $this->themingDefaults = $this->createMock('\OCA\Theming\ThemingDefaults');
- $this->urlGenerator = $this->createMock('\OCP\IURLGenerator');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->themingDefaults = $this->getMockBuilder('\OCA\Theming\ThemingDefaults')->disableOriginalConstructor()->getMock();
+ $this->urlGenerator = $this->getMockBuilder('\OCP\IURLGenerator')->getMock();
$this->admin = new Admin(
$this->config,
diff --git a/apps/theming/tests/Settings/SectionTest.php b/apps/theming/tests/Settings/SectionTest.php
index e8a9a217f1f..3a3a4375236 100644
--- a/apps/theming/tests/Settings/SectionTest.php
+++ b/apps/theming/tests/Settings/SectionTest.php
@@ -35,7 +35,7 @@ class SectionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->createMock('\OCP\IL10N');
+ $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->section = new Section(
$this->l
diff --git a/apps/updatenotification/tests/Controller/AdminControllerTest.php b/apps/updatenotification/tests/Controller/AdminControllerTest.php
index a4398715885..cf99679e680 100644
--- a/apps/updatenotification/tests/Controller/AdminControllerTest.php
+++ b/apps/updatenotification/tests/Controller/AdminControllerTest.php
@@ -59,14 +59,14 @@ class AdminControllerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->request = $this->createMock('\\OCP\\IRequest');
- $this->jobList = $this->createMock('\\OCP\\BackgroundJob\\IJobList');
- $this->secureRandom = $this->createMock('\\OCP\\Security\\ISecureRandom');
- $this->config = $this->createMock('\\OCP\\IConfig');
- $this->timeFactory = $this->createMock('\\OCP\\AppFramework\\Utility\\ITimeFactory');
- $this->l10n = $this->createMock('\\OCP\\IL10N');
- $this->updateChecker = $this->createMock('\\OCA\\UpdateNotification\\UpdateChecker');
- $this->dateTimeFormatter = $this->createMock('\\OCP\\IDateTimeFormatter');
+ $this->request = $this->getMockBuilder('\\OCP\\IRequest')->getMock();
+ $this->jobList = $this->getMockBuilder('\\OCP\\BackgroundJob\\IJobList')->getMock();
+ $this->secureRandom = $this->getMockBuilder('\\OCP\\Security\\ISecureRandom')->getMock();
+ $this->config = $this->getMockBuilder('\\OCP\\IConfig')->getMock();
+ $this->timeFactory = $this->getMockBuilder('\\OCP\\AppFramework\\Utility\\ITimeFactory')->getMock();
+ $this->l10n = $this->getMockBuilder('\\OCP\\IL10N')->getMock();
+ $this->updateChecker = $this->getMockBuilder('\\OCA\\UpdateNotification\\UpdateChecker')->disableOriginalConstructor()->getMock();
+ $this->dateTimeFormatter = $this->getMockBuilder('\\OCP\\IDateTimeFormatter')->getMock();
$this->adminController = new AdminController(
'updatenotification',
diff --git a/apps/user_ldap/tests/Settings/AdminTest.php b/apps/user_ldap/tests/Settings/AdminTest.php
index e92684f3ce4..4ac5a14f58b 100644
--- a/apps/user_ldap/tests/Settings/AdminTest.php
+++ b/apps/user_ldap/tests/Settings/AdminTest.php
@@ -43,7 +43,7 @@ class AdminTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l10n = $this->createMock('\OCP\IL10N');
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->admin = new Admin(
$this->l10n
diff --git a/apps/user_ldap/tests/Settings/SectionTest.php b/apps/user_ldap/tests/Settings/SectionTest.php
index b5b1f97ce3c..2d2165b8e56 100644
--- a/apps/user_ldap/tests/Settings/SectionTest.php
+++ b/apps/user_ldap/tests/Settings/SectionTest.php
@@ -35,7 +35,7 @@ class SectionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->l = $this->createMock('\OCP\IL10N');
+ $this->l = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->section = new Section(
$this->l
diff --git a/tests/Settings/Controller/AdminSettingsControllerTest.php b/tests/Settings/Controller/AdminSettingsControllerTest.php
index 86950c9aa9d..6c93bca0d68 100644
--- a/tests/Settings/Controller/AdminSettingsControllerTest.php
+++ b/tests/Settings/Controller/AdminSettingsControllerTest.php
@@ -44,9 +44,9 @@ class AdminSettingsControllerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->request = $this->createMock('\OCP\IRequest');
- $this->navigationManager = $this->createMock('\OCP\INavigationManager');
- $this->settingsManager = $this->createMock('\OCP\Settings\IManager');
+ $this->request = $this->getMockBuilder('\OCP\IRequest')->getMock();
+ $this->navigationManager = $this->getMockBuilder('\OCP\INavigationManager')->getMock();
+ $this->settingsManager = $this->getMockBuilder('\OCP\Settings\IManager')->getMock();
$this->adminSettingsController = new AdminSettingsController(
'settings',
@@ -65,7 +65,7 @@ class AdminSettingsControllerTest extends TestCase {
->expects($this->once())
->method('getAdminSettings')
->with('test')
- ->willReturn([5 => new TipsTricks($this->createMock('\OCP\IConfig'))]);
+ ->willReturn([5 => new TipsTricks($this->getMockBuilder('\OCP\IConfig')->getMock())]);
$expected = new TemplateResponse('settings', 'admin/frame', ['forms' => [], 'content' => '']);
$this->assertEquals($expected, $this->adminSettingsController->index('test'));
}
diff --git a/tests/Settings/Controller/CheckSetupControllerTest.php b/tests/Settings/Controller/CheckSetupControllerTest.php
index 63c8141cedd..770d5a4934e 100644
--- a/tests/Settings/Controller/CheckSetupControllerTest.php
+++ b/tests/Settings/Controller/CheckSetupControllerTest.php
@@ -98,7 +98,7 @@ class CheckSetupControllerTest extends TestCase {
}));
$this->checker = $this->getMockBuilder('\OC\IntegrityCheck\Checker')
->disableOriginalConstructor()->getMock();
- $this->logger = $this->createMock('\OCP\ILogger');
+ $this->logger = $this->getMockBuilder('\OCP\ILogger')->getMock();
$this->checkSetupController = $this->getMockBuilder('\OC\Settings\Controller\CheckSetupController')
->setConstructorArgs([
'settings',
diff --git a/tests/lib/Settings/Admin/AdditionalTest.php b/tests/lib/Settings/Admin/AdditionalTest.php
index 178d7550614..3a99893cf7c 100644
--- a/tests/lib/Settings/Admin/AdditionalTest.php
+++ b/tests/lib/Settings/Admin/AdditionalTest.php
@@ -36,7 +36,7 @@ class AdditionalTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
$this->admin = new Additional(
$this->config
diff --git a/tests/lib/Settings/Admin/EncryptionTest.php b/tests/lib/Settings/Admin/EncryptionTest.php
index a68b40ae11b..f9763d85c1f 100644
--- a/tests/lib/Settings/Admin/EncryptionTest.php
+++ b/tests/lib/Settings/Admin/EncryptionTest.php
@@ -39,8 +39,8 @@ class EncryptionTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->manager = $this->createMock('\OC\Encryption\Manager');
- $this->userManager = $this->createMock('\OCP\IUserManager');
+ $this->manager = $this->getMockBuilder('\OC\Encryption\Manager')->disableOriginalConstructor()->getMock();
+ $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
$this->admin = new Encryption(
$this->manager,
diff --git a/tests/lib/Settings/Admin/LoggingTest.php b/tests/lib/Settings/Admin/LoggingTest.php
index 10a94f1c59c..181553d3894 100644
--- a/tests/lib/Settings/Admin/LoggingTest.php
+++ b/tests/lib/Settings/Admin/LoggingTest.php
@@ -37,7 +37,7 @@ class LoggingTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
$this->admin = new Logging(
$this->config
diff --git a/tests/lib/Settings/Admin/ServerTest.php b/tests/lib/Settings/Admin/ServerTest.php
index 5a4fa22920f..874422307e0 100644
--- a/tests/lib/Settings/Admin/ServerTest.php
+++ b/tests/lib/Settings/Admin/ServerTest.php
@@ -46,10 +46,10 @@ class ServerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
- $this->dbConnection = $this->createMock('\OCP\IDBConnection');
- $this->lockingProvider = $this->createMock('\OCP\Lock\ILockingProvider');
- $this->l10n = $this->createMock('\OCP\IL10N');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->dbConnection = $this->getMockBuilder('\OCP\IDBConnection')->getMock();
+ $this->lockingProvider = $this->getMockBuilder('\OCP\Lock\ILockingProvider')->getMock();
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
$this->admin = new Server(
$this->dbConnection,
diff --git a/tests/lib/Settings/Admin/SharingTest.php b/tests/lib/Settings/Admin/SharingTest.php
index 7aec187d372..261e631363a 100644
--- a/tests/lib/Settings/Admin/SharingTest.php
+++ b/tests/lib/Settings/Admin/SharingTest.php
@@ -36,7 +36,7 @@ class SharingTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
$this->admin = new Sharing(
$this->config
diff --git a/tests/lib/Settings/Admin/TipsTricksTest.php b/tests/lib/Settings/Admin/TipsTricksTest.php
index afa053e8337..0e8857b56d0 100644
--- a/tests/lib/Settings/Admin/TipsTricksTest.php
+++ b/tests/lib/Settings/Admin/TipsTricksTest.php
@@ -36,7 +36,7 @@ class TipsTrickTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->config = $this->createMock('\OCP\IConfig');
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
$this->admin = new TipsTricks(
$this->config
diff --git a/tests/lib/Settings/ManagerTest.php b/tests/lib/Settings/ManagerTest.php
index 01e226225be..cd5100eff6d 100644
--- a/tests/lib/Settings/ManagerTest.php
+++ b/tests/lib/Settings/ManagerTest.php
@@ -56,13 +56,13 @@ class ManagerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->logger = $this->createMock('\OCP\ILogger');
- $this->dbConnection = $this->createMock('\OCP\IDBConnection');
- $this->l10n = $this->createMock('\OCP\IL10N');
- $this->config = $this->createMock('\OCP\IConfig');
- $this->encryptionManager = $this->createMock('\OCP\Encryption\IManager');
- $this->userManager = $this->createMock('\OCP\IUserManager');
- $this->lockingProvider = $this->createMock('\OCP\Lock\ILockingProvider');
+ $this->logger = $this->getMockBuilder('\OCP\ILogger')->getMock();
+ $this->dbConnection = $this->getMockBuilder('\OCP\IDBConnection')->getMock();
+ $this->l10n = $this->getMockBuilder('\OCP\IL10N')->getMock();
+ $this->config = $this->getMockBuilder('\OCP\IConfig')->getMock();
+ $this->encryptionManager = $this->getMockBuilder('\OCP\Encryption\IManager')->getMock();
+ $this->userManager = $this->getMockBuilder('\OCP\IUserManager')->getMock();
+ $this->lockingProvider = $this->getMockBuilder('\OCP\Lock\ILockingProvider')->getMock();
$this->manager = new Manager(
$this->logger,
@@ -76,7 +76,7 @@ class ManagerTest extends TestCase {
}
public function testSetupSettings() {
- $qb = $this->createMock('\OCP\DB\QueryBuilder\IQueryBuilder');
+ $qb = $this->getMockBuilder('\OCP\DB\QueryBuilder\IQueryBuilder')->getMock();
$qb
->expects($this->once())
->method('select')
@@ -91,12 +91,12 @@ class ManagerTest extends TestCase {
->method('from')
->with('admin_settings')
->willReturn($qb);
- $expressionBuilder = $this->createMock('\OCP\DB\QueryBuilder\IExpressionBuilder');
+ $expressionBuilder = $this->getMockBuilder('\OCP\DB\QueryBuilder\IExpressionBuilder')->getMock();
$qb
->expects($this->once())
->method('expr')
->willReturn($expressionBuilder);
- $param = $this->createMock('\OCP\DB\QueryBuilder\IParameter');
+ $param = $this->getMockBuilder('\OCP\DB\QueryBuilder\IParameter')->getMock();
$qb
->expects($this->once())
->method('createNamedParameter')
@@ -112,13 +112,13 @@ class ManagerTest extends TestCase {
->method('where')
->with('myString')
->willReturn($qb);
- $stmt = $this->createMock('\Doctrine\DBAL\Driver\Statement');
+ $stmt = $this->getMockBuilder('\Doctrine\DBAL\Driver\Statement')->getMock();
$qb
->expects($this->once())
->method('execute')
->willReturn($stmt);
- $qb1 = $this->createMock('\OCP\DB\QueryBuilder\IQueryBuilder');
+ $qb1 = $this->getMockBuilder('\OCP\DB\QueryBuilder\IQueryBuilder')->getMock();
$qb1
->expects($this->once())
->method('insert')
@@ -135,7 +135,7 @@ class ManagerTest extends TestCase {
}
public function testGetAdminSections() {
- $qb = $this->createMock('\OCP\DB\QueryBuilder\IQueryBuilder');
+ $qb = $this->getMockBuilder('\OCP\DB\QueryBuilder\IQueryBuilder')->getMock();
$qb
->expects($this->once())
->method('select')
@@ -146,7 +146,7 @@ class ManagerTest extends TestCase {
->method('from')
->with('admin_sections')
->willReturn($qb);
- $stmt = $this->createMock('\Doctrine\DBAL\Driver\Statement');
+ $stmt = $this->getMockBuilder('\Doctrine\DBAL\Driver\Statement')->getMock();
$qb
->expects($this->once())
->method('execute')
@@ -171,7 +171,7 @@ class ManagerTest extends TestCase {
}
public function testGetAdminSettings() {
- $qb = $this->createMock('\OCP\DB\QueryBuilder\IQueryBuilder');
+ $qb = $this->getMockBuilder('\OCP\DB\QueryBuilder\IQueryBuilder')->getMock();
$qb
->expects($this->once())
->method('select')
@@ -182,12 +182,12 @@ class ManagerTest extends TestCase {
->method('from')
->with('admin_settings')
->willReturn($qb);
- $expressionBuilder = $this->createMock('\OCP\DB\QueryBuilder\IExpressionBuilder');
+ $expressionBuilder = $this->getMockBuilder('\OCP\DB\QueryBuilder\IExpressionBuilder')->getMock();
$qb
->expects($this->once())
->method('expr')
->willReturn($expressionBuilder);
- $param = $this->createMock('\OCP\DB\QueryBuilder\IParameter');
+ $param = $this->getMockBuilder('\OCP\DB\QueryBuilder\IParameter')->getMock();
$qb
->expects($this->once())
->method('createParameter')
@@ -203,7 +203,7 @@ class ManagerTest extends TestCase {
->method('where')
->with('myString')
->willReturn($qb);
- $stmt = $this->createMock('\Doctrine\DBAL\Driver\Statement');
+ $stmt = $this->getMockBuilder('\Doctrine\DBAL\Driver\Statement')->getMock();
$qb
->expects($this->once())
->method('execute')