diff options
author | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-08 14:15:25 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-14 20:03:28 +0100 |
commit | 8d0c7cc5fa903ca3d4bbfeea411fac71d81d1c01 (patch) | |
tree | 5d12f4538cc1717ba338119518973748fc2be05d /tests | |
parent | 8bd9858345cc4e39c024e8dcb5ae688701606b11 (diff) | |
download | nextcloud-server-8d0c7cc5fa903ca3d4bbfeea411fac71d81d1c01.tar.gz nextcloud-server-8d0c7cc5fa903ca3d4bbfeea411fac71d81d1c01.zip |
fix: Allow to set custom app order on navigation entries added by closures to NavigationManager
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/App/AppManagerTest.php | 6 | ||||
-rw-r--r-- | tests/lib/NavigationManagerTest.php | 7 |
2 files changed, 4 insertions, 9 deletions
diff --git a/tests/lib/App/AppManagerTest.php b/tests/lib/App/AppManagerTest.php index 104b0941644..410bfa287fc 100644 --- a/tests/lib/App/AppManagerTest.php +++ b/tests/lib/App/AppManagerTest.php @@ -680,7 +680,7 @@ class AppManagerTest extends TestCase { [ 'unexist,settings', 'files', - '{"settings":[1],"files":[2]}', + '{"settings":{"app":"settings","order":1},"files":{"app":"files","order":2}}', true, 'files', ], @@ -688,7 +688,7 @@ class AppManagerTest extends TestCase { [ '', '', - '{"settings":[1],"files":[2]}', + '{"settings":{"app":"settings","order":1},"files":{"app":"files","order":2}}', true, 'settings', ], @@ -696,7 +696,7 @@ class AppManagerTest extends TestCase { [ '', '', - '{"settings":[1],"files":[2]}', + '{"settings":{"app":"settings","order":1},"files":{"app":"files","order":2}}', false, '', ], diff --git a/tests/lib/NavigationManagerTest.php b/tests/lib/NavigationManagerTest.php index 8edf7ecb9cc..63160e78de7 100644 --- a/tests/lib/NavigationManagerTest.php +++ b/tests/lib/NavigationManagerTest.php @@ -365,7 +365,6 @@ class NavigationManagerTest extends TestCase { 'unread' => 0, 'default' => true, 'app' => 'test', - 'key' => 0, ]], ['logout' => $defaults['logout']] ), @@ -416,7 +415,6 @@ class NavigationManagerTest extends TestCase { 'unread' => 0, 'default' => false, 'app' => 'test', - 'key' => 0, ], 'test1' => [ 'id' => 'test1', @@ -430,7 +428,6 @@ class NavigationManagerTest extends TestCase { 'unread' => 0, 'default' => true, // because of order 'app' => 'test', - 'key' => 1, ]], ['logout' => $defaults['logout']] ), @@ -458,7 +455,6 @@ class NavigationManagerTest extends TestCase { 'unread' => 0, 'default' => true, 'app' => 'test', - 'key' => 0, ]], ['logout' => $defaults['logout']] ), @@ -514,7 +510,6 @@ class NavigationManagerTest extends TestCase { 'unread' => 0, 'default' => true, 'app' => 'test', - 'key' => 0, ], ]; $navigation = ['navigations' => [ @@ -528,7 +523,7 @@ class NavigationManagerTest extends TestCase { function (string $userId, string $appName, string $key, mixed $default = '') use ($testOrder) { $this->assertEquals('user001', $userId); if ($key === 'apporder') { - return json_encode(['test' => [$testOrder]]); + return json_encode(['test' => ['app' => 'test', 'order' => $testOrder]]); } return $default; } |