@@ -215,7 +215,19 @@ public function testWithAppManager($expected, $navigation, $isAdmin = false) {
215215 return vsprintf ($ text , $ parameters );
216216 });
217217
218+ $ this ->appManager ->expects ($ this ->any ())
219+ ->method ('isEnabledForUser ' )
220+ ->with ('theming ' )
221+ ->willReturn (true );
218222 $ this ->appManager ->expects ($ this ->once ())->method ('getAppInfo ' )->with ('test ' )->willReturn ($ navigation );
223+ /*
224+ $this->appManager->expects($this->any())
225+ ->method('getAppInfo')
226+ ->will($this->returnValueMap([
227+ ['test', null, null, $navigation],
228+ ['theming', null, null, null],
229+ ]));
230+ */
219231 $ this ->l10nFac ->expects ($ this ->any ())->method ('get ' )->willReturn ($ l );
220232 $ this ->urlGenerator ->expects ($ this ->any ())->method ('imagePath ' )->willReturnCallback (function ($ appName , $ file ) {
221233 return "/apps/ $ appName/img/ $ file " ;
@@ -230,7 +242,7 @@ public function testWithAppManager($expected, $navigation, $isAdmin = false) {
230242 $ user ->expects ($ this ->any ())->method ('getUID ' )->willReturn ('user001 ' );
231243 $ this ->userSession ->expects ($ this ->any ())->method ('getUser ' )->willReturn ($ user );
232244 $ this ->userSession ->expects ($ this ->any ())->method ('isLoggedIn ' )->willReturn (true );
233- $ this ->appManager ->expects ($ this ->once ())
245+ $ this ->appManager ->expects ($ this ->any ())
234246 ->method ('getEnabledAppsForUser ' )
235247 ->with ($ user )
236248 ->willReturn (['test ' ]);
@@ -248,7 +260,7 @@ public function providesNavigationConfig() {
248260 $ apps = [
249261 'core_apps ' => [
250262 'id ' => 'core_apps ' ,
251- 'order ' => 4 ,
263+ 'order ' => 5 ,
252264 'href ' => '/apps/test/ ' ,
253265 'icon ' => '/apps/settings/img/apps.svg ' ,
254266 'name ' => 'Apps ' ,
@@ -259,9 +271,20 @@ public function providesNavigationConfig() {
259271 ]
260272 ];
261273 $ defaults = [
274+ 'accessibility_settings ' => [
275+ 'type ' => 'settings ' ,
276+ 'id ' => 'accessibility_settings ' ,
277+ 'order ' => 2 ,
278+ 'href ' => '/apps/test/ ' ,
279+ 'name ' => 'Appearance and accessibility ' ,
280+ 'icon ' => '/apps/theming/img/accessibility-dark.svg ' ,
281+ 'active ' => false ,
282+ 'classes ' => '' ,
283+ 'unread ' => 0 ,
284+ ],
262285 'settings ' => [
263286 'id ' => 'settings ' ,
264- 'order ' => 2 ,
287+ 'order ' => 3 ,
265288 'href ' => '/apps/test/ ' ,
266289 'icon ' => '/apps/settings/img/admin.svg ' ,
267290 'name ' => 'Settings ' ,
@@ -283,9 +306,10 @@ public function providesNavigationConfig() {
283306 ]
284307 ];
285308 $ adminSettings = [
309+ 'accessibility_settings ' => $ defaults ['accessibility_settings ' ],
286310 'settings ' => [
287311 'id ' => 'settings ' ,
288- 'order ' => 2 ,
312+ 'order ' => 3 ,
289313 'href ' => '/apps/test/ ' ,
290314 'icon ' => '/apps/settings/img/personal.svg ' ,
291315 'name ' => 'Personal settings ' ,
@@ -296,7 +320,7 @@ public function providesNavigationConfig() {
296320 ],
297321 'admin_settings ' => [
298322 'id ' => 'admin_settings ' ,
299- 'order ' => 3 ,
323+ 'order ' => 4 ,
300324 'href ' => '/apps/test/ ' ,
301325 'icon ' => '/apps/settings/img/admin.svg ' ,
302326 'name ' => 'Administration settings ' ,
@@ -310,6 +334,7 @@ public function providesNavigationConfig() {
310334 return [
311335 'minimalistic ' => [
312336 array_merge (
337+ ['accessibility_settings ' => $ defaults ['accessibility_settings ' ]],
313338 ['settings ' => $ defaults ['settings ' ]],
314339 ['test ' => [
315340 'id ' => 'test ' ,
@@ -332,6 +357,7 @@ public function providesNavigationConfig() {
332357 ],
333358 'minimalistic-settings ' => [
334359 array_merge (
360+ ['accessibility_settings ' => $ defaults ['accessibility_settings ' ]],
335361 ['settings ' => $ defaults ['settings ' ]],
336362 ['test ' => [
337363 'id ' => 'test ' ,
0 commit comments