From 33252cda9ea28517386d4a14f35364b03d610326 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 6 Jul 2017 09:30:42 +0200 Subject: [PATCH] Adjust tests to the old settings menu Signed-off-by: Joas Schilling --- tests/lib/NavigationManagerTest.php | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index de432e1eaf2..ab396a88c73 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -247,13 +247,24 @@ class NavigationManagerTest extends TestCase { 'type' => 'settings', ] ]; + $admin = [ + [ + 'id' => 'admin', + 'order' => 2, + 'href' => '/apps/test/', + 'icon' => '/apps/settings/img/admin.svg', + 'name' => 'Admin', + 'active' => false, + 'type' => 'settings', + ] + ]; $defaults = [ [ - 'id' => 'settings', + 'id' => 'personal', 'order' => 1, 'href' => '/apps/test/', - 'icon' => '/apps/settings/img/admin.svg', - 'name' => 'Settings', + 'icon' => '/apps/settings/img/personal.svg', + 'name' => 'Personal', 'active' => false, 'type' => 'settings', ], @@ -286,7 +297,7 @@ class NavigationManagerTest extends TestCase { 'active' => false, 'type' => 'settings', ]]), ['navigations' => [['route' => 'test.page.index', 'name' => 'Test', 'type' => 'settings']]]], - 'admin' => [array_merge($apps, $defaults, [[ + 'admin' => [array_merge($apps, $defaults, $admin, [[ 'id' => 'test', 'order' => 100, 'href' => '/apps/test/', @@ -295,7 +306,7 @@ class NavigationManagerTest extends TestCase { 'active' => false, 'type' => 'link', ]]), ['navigations' => [['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index', 'name' => 'Test']]], true], - 'no name' => [array_merge($apps, $defaults), ['navigations' => [['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index']]], true], + 'no name' => [array_merge($apps, $defaults, $admin), ['navigations' => [['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index']]], true], 'no admin' => [$defaults, ['navigations' => [['@attributes' => ['role' => 'admin'], 'route' => 'test.page.index', 'name' => 'Test']]]] ]; } -- 2.39.5