@@ -68,22 +68,31 @@ public function testGetAppNavigation($absolute) {
6868 $ this ->navigationManager ->expects ($ this ->once ())
6969 ->method ('getAll ' )
7070 ->with ('link ' )
71- ->willReturn ([ ['id ' => 'files ' , 'href ' => '/index.php/apps/files ' ] ]);
71+ ->willReturn ([ ['id ' => 'files ' , 'href ' => '/index.php/apps/files ' , ' icon ' => ' icon ' ] ]);
7272 if ($ absolute ) {
7373 $ this ->urlGenerator ->expects ($ this ->any ())
7474 ->method ('getBaseURL ' )
7575 ->willReturn ('http://localhost/ ' );
76- $ this ->urlGenerator ->expects ($ this ->once ( ))
76+ $ this ->urlGenerator ->expects ($ this ->at ( 1 ))
7777 ->method ('getAbsoluteURL ' )
7878 ->with ('/index.php/apps/files ' )
7979 ->willReturn ('http://localhost/index.php/apps/files ' );
80+ $ this ->urlGenerator ->expects ($ this ->at (3 ))
81+ ->method ('getAbsoluteURL ' )
82+ ->with ('icon ' )
83+ ->willReturn ('http://localhost/icon ' );
8084 $ actual = $ this ->controller ->getAppsNavigation ($ absolute );
8185 $ this ->assertInstanceOf (DataResponse::class, $ actual );
8286 $ this ->assertEquals ('http://localhost/index.php/apps/files ' , $ actual ->getData ()[0 ]['href ' ]);
87+ $ this ->assertEquals ('http://localhost/icon ' , $ actual ->getData ()[0 ]['icon ' ]);
88+
89+
8390 } else {
8491 $ actual = $ this ->controller ->getAppsNavigation ($ absolute );
8592 $ this ->assertInstanceOf (DataResponse::class, $ actual );
8693 $ this ->assertEquals ('/index.php/apps/files ' , $ actual ->getData ()[0 ]['href ' ]);
94+ $ this ->assertEquals ('icon ' , $ actual ->getData ()[0 ]['icon ' ]);
95+
8796 }
8897 }
8998
@@ -92,22 +101,28 @@ public function testGetSettingsNavigation($absolute) {
92101 $ this ->navigationManager ->expects ($ this ->once ())
93102 ->method ('getAll ' )
94103 ->with ('settings ' )
95- ->willReturn ([ ['id ' => 'settings ' , 'href ' => '/index.php/settings/user ' ] ]);
104+ ->willReturn ([ ['id ' => 'settings ' , 'href ' => '/index.php/settings/user ' , ' icon ' => ' /core/img/settings.svg ' ] ]);
96105 if ($ absolute ) {
97106 $ this ->urlGenerator ->expects ($ this ->any ())
98107 ->method ('getBaseURL ' )
99108 ->willReturn ('http://localhost/ ' );
100- $ this ->urlGenerator ->expects ($ this ->once ( ))
109+ $ this ->urlGenerator ->expects ($ this ->at ( 1 ))
101110 ->method ('getAbsoluteURL ' )
102111 ->with ('/index.php/settings/user ' )
103112 ->willReturn ('http://localhost/index.php/settings/user ' );
113+ $ this ->urlGenerator ->expects ($ this ->at (3 ))
114+ ->method ('getAbsoluteURL ' )
115+ ->with ('/core/img/settings.svg ' )
116+ ->willReturn ('http://localhost/core/img/settings.svg ' );
104117 $ actual = $ this ->controller ->getSettingsNavigation ($ absolute );
105118 $ this ->assertInstanceOf (DataResponse::class, $ actual );
106119 $ this ->assertEquals ('http://localhost/index.php/settings/user ' , $ actual ->getData ()[0 ]['href ' ]);
120+ $ this ->assertEquals ('http://localhost/core/img/settings.svg ' , $ actual ->getData ()[0 ]['icon ' ]);
107121 } else {
108122 $ actual = $ this ->controller ->getSettingsNavigation ($ absolute );
109123 $ this ->assertInstanceOf (DataResponse::class, $ actual );
110124 $ this ->assertEquals ('/index.php/settings/user ' , $ actual ->getData ()[0 ]['href ' ]);
125+ $ this ->assertEquals ('/core/img/settings.svg ' , $ actual ->getData ()[0 ]['icon ' ]);
111126 }
112127 }
113128
0 commit comments