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 /tests/Settings/Controller/AdminSettingsControllerTest.php | |
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 'tests/Settings/Controller/AdminSettingsControllerTest.php')
-rw-r--r-- | tests/Settings/Controller/AdminSettingsControllerTest.php | 8 |
1 files changed, 4 insertions, 4 deletions
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')); } |