diff options
author | Joas Schilling <coding@schilljs.com> | 2017-01-27 09:38:10 +0100 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2017-01-27 09:44:11 +0100 |
commit | 27f8a832e41590a33a7815d328564a1fd70e7760 (patch) | |
tree | 5c05746c23cc788a23d0dc8e646807ce210d9054 /tests/lib/NavigationManagerTest.php | |
parent | 47d7d26bdafe1d898af69aa35ab049a85e8d2b98 (diff) | |
download | nextcloud-server-27f8a832e41590a33a7815d328564a1fd70e7760.tar.gz nextcloud-server-27f8a832e41590a33a7815d328564a1fd70e7760.zip |
Force to specify the name
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/lib/NavigationManagerTest.php')
-rw-r--r-- | tests/lib/NavigationManagerTest.php | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 942dcbe1865..64fec802eca 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -12,6 +12,7 @@ namespace Test; +use OC\App\AppManager; use OC\NavigationManager; use OCP\App\IAppManager; use OCP\IGroupManager; @@ -170,7 +171,7 @@ class NavigationManagerTest extends TestCase { */ public function testWithAppManager($expected, $config, $isAdmin = false) { - $appManager = $this->createMock(IAppManager::class); + $appManager = $this->createMock(AppManager::class); $urlGenerator = $this->createMock(IURLGenerator::class); $l10nFac = $this->createMock(IFactory::class); $userSession = $this->createMock(IUserSession::class); @@ -209,7 +210,7 @@ class NavigationManagerTest extends TestCase { 'icon' => '/apps/test/img/app.svg', 'name' => 'Test', 'active' => false - ]], ['navigation' => ['route' => 'test.page.index']]], + ]], ['navigation' => ['route' => 'test.page.index', 'name' => 'Test']]], 'no admin' => [[[ 'id' => 'test', 'order' => 100, @@ -217,8 +218,9 @@ class NavigationManagerTest extends TestCase { 'icon' => '/apps/test/img/app.svg', 'name' => 'Test', 'active' => false - ]], ['navigation' => ['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index']], true], - 'admin' => [[], ['navigation' => ['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index']]] + ]], ['navigation' => ['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index', 'name' => 'Test']], true], + 'no name' => [[], ['navigation' => ['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index']], true], + 'admin' => [[], ['navigation' => ['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index', 'name' => 'Test']]] ]; } } |