diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2016-08-15 16:43:22 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2016-08-15 16:43:22 +0200 |
commit | 7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae (patch) | |
tree | 8472e73eb69f8495405231d44e1d580cbd0942bd /apps/files_external | |
parent | 8a7a0f328746230dd896ccc53b3ada271a91b930 (diff) | |
download | nextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.tar.gz nextcloud-server-7ffb7b0d846241c8cc6b45a3c85b2374c6d026ae.zip |
Use MockBuilder instead of createMock
CI uses an older PHPUnit
Diffstat (limited to 'apps/files_external')
-rw-r--r-- | apps/files_external/tests/Settings/AdminTest.php | 8 | ||||
-rw-r--r-- | apps/files_external/tests/Settings/SectionTest.php | 2 |
2 files changed, 5 insertions, 5 deletions
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 |