@@ -75,14 +75,13 @@ public function testGetAppNavigation($absolute) {
7575 $ this ->urlGenerator ->expects ($ this ->any ())
7676 ->method ('getBaseURL ' )
7777 ->willReturn ('http://localhost/ ' );
78- $ this ->urlGenerator ->expects ($ this ->at ( 1 ))
78+ $ this ->urlGenerator ->expects ($ this ->exactly ( 2 ))
7979 ->method ('getAbsoluteURL ' )
80- ->with ('/index.php/apps/files ' )
81- ->willReturn ('http://localhost/index.php/apps/files ' );
82- $ this ->urlGenerator ->expects ($ this ->at (3 ))
83- ->method ('getAbsoluteURL ' )
84- ->with ('icon ' )
85- ->willReturn ('http://localhost/icon ' );
80+ ->withConsecutive (['/index.php/apps/files ' ], ['icon ' ])
81+ ->willReturnOnConsecutiveCalls (
82+ 'http://localhost/index.php/apps/files ' ,
83+ 'http://localhost/icon '
84+ );
8685 $ actual = $ this ->controller ->getAppsNavigation ($ absolute );
8786 $ this ->assertInstanceOf (DataResponse::class, $ actual );
8887 $ this ->assertEquals ('http://localhost/index.php/apps/files ' , $ actual ->getData ()[0 ]['href ' ]);
@@ -105,14 +104,16 @@ public function testGetSettingsNavigation($absolute) {
105104 $ this ->urlGenerator ->expects ($ this ->any ())
106105 ->method ('getBaseURL ' )
107106 ->willReturn ('http://localhost/ ' );
108- $ this ->urlGenerator ->expects ($ this ->at (1 ))
109- ->method ('getAbsoluteURL ' )
110- ->with ('/index.php/settings/user ' )
111- ->willReturn ('http://localhost/index.php/settings/user ' );
112- $ this ->urlGenerator ->expects ($ this ->at (3 ))
107+ $ this ->urlGenerator ->expects ($ this ->exactly (2 ))
113108 ->method ('getAbsoluteURL ' )
114- ->with ('/core/img/settings.svg ' )
115- ->willReturn ('http://localhost/core/img/settings.svg ' );
109+ ->withConsecutive (
110+ ['/index.php/settings/user ' ],
111+ ['/core/img/settings.svg ' ]
112+ )
113+ ->willReturnOnConsecutiveCalls (
114+ 'http://localhost/index.php/settings/user ' ,
115+ 'http://localhost/core/img/settings.svg '
116+ );
116117 $ actual = $ this ->controller ->getSettingsNavigation ($ absolute );
117118 $ this ->assertInstanceOf (DataResponse::class, $ actual );
118119 $ this ->assertEquals ('http://localhost/index.php/settings/user ' , $ actual ->getData ()[0 ]['href ' ]);
0 commit comments