aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Settings/Controller/AdminSettingsControllerTest.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-10-24 15:26:53 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-10-24 17:45:32 +0200
commit43e498844e8c1aa519a19238d2cf3d6b95e1aab0 (patch)
tree59510ef2ffc6c1fd1fd92475013b108f1da2bfeb /tests/Settings/Controller/AdminSettingsControllerTest.php
parentb1f77aca4effec99387481a831910d4870ae2ffc (diff)
downloadnextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.tar.gz
nextcloud-server-43e498844e8c1aa519a19238d2cf3d6b95e1aab0.zip
Use ::class in test mocks
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'tests/Settings/Controller/AdminSettingsControllerTest.php')
-rw-r--r--tests/Settings/Controller/AdminSettingsControllerTest.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/Settings/Controller/AdminSettingsControllerTest.php b/tests/Settings/Controller/AdminSettingsControllerTest.php
index 51357f67a2d..d5650b397fa 100644
--- a/tests/Settings/Controller/AdminSettingsControllerTest.php
+++ b/tests/Settings/Controller/AdminSettingsControllerTest.php
@@ -25,6 +25,7 @@ namespace Tests\Settings\Controller;
use OC\Settings\Admin\TipsTricks;
use OC\Settings\Controller\AdminSettingsController;
use OCP\AppFramework\Http\TemplateResponse;
+use OCP\IConfig;
use OCP\INavigationManager;
use OCP\IRequest;
use OCP\Settings\IManager;
@@ -52,9 +53,9 @@ class AdminSettingsControllerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->request = $this->getMockBuilder('\OCP\IRequest')->getMock();
- $this->navigationManager = $this->getMockBuilder('\OCP\INavigationManager')->getMock();
- $this->settingsManager = $this->getMockBuilder('\OCP\Settings\IManager')->getMock();
+ $this->request = $this->getMockBuilder(IRequest::class)->getMock();
+ $this->navigationManager = $this->getMockBuilder(INavigationManager::class)->getMock();
+ $this->settingsManager = $this->getMockBuilder(IManager::class)->getMock();
$this->adminSettingsController = new AdminSettingsController(
'settings',
@@ -87,7 +88,7 @@ class AdminSettingsControllerTest extends TestCase {
->expects($this->once())
->method('getAdminSettings')
->with('test')
- ->willReturn([5 => new TipsTricks($this->getMockBuilder('\OCP\IConfig')->getMock())]);
+ ->willReturn([5 => new TipsTricks($this->getMockBuilder(IConfig::class)->getMock())]);
$expected = new TemplateResponse('settings', 'settings/frame', ['forms' => ['personal' => [], 'admin' => []], 'content' => '']);
$this->assertEquals($expected, $this->adminSettingsController->index('test'));