summaryrefslogtreecommitdiffstats
path: root/tests/Core/Controller/NavigationControllerTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Core/Controller/NavigationControllerTest.php')
-rw-r--r--tests/Core/Controller/NavigationControllerTest.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/tests/Core/Controller/NavigationControllerTest.php b/tests/Core/Controller/NavigationControllerTest.php
index 39f389faa5e..ddf307ec06d 100644
--- a/tests/Core/Controller/NavigationControllerTest.php
+++ b/tests/Core/Controller/NavigationControllerTest.php
@@ -74,14 +74,13 @@ class NavigationControllerTest extends TestCase {
$this->urlGenerator->expects($this->any())
->method('getBaseURL')
->willReturn('http://localhost/');
- $this->urlGenerator->expects($this->at(1))
+ $this->urlGenerator->expects($this->exactly(2))
->method('getAbsoluteURL')
- ->with('/index.php/apps/files')
- ->willReturn('http://localhost/index.php/apps/files');
- $this->urlGenerator->expects($this->at(3))
- ->method('getAbsoluteURL')
- ->with('icon')
- ->willReturn('http://localhost/icon');
+ ->withConsecutive(['/index.php/apps/files'], ['icon'])
+ ->willReturnOnConsecutiveCalls(
+ 'http://localhost/index.php/apps/files',
+ 'http://localhost/icon'
+ );
$actual = $this->controller->getAppsNavigation($absolute);
$this->assertInstanceOf(DataResponse::class, $actual);
$this->assertEquals('http://localhost/index.php/apps/files', $actual->getData()[0]['href']);
@@ -104,14 +103,16 @@ class NavigationControllerTest extends TestCase {
$this->urlGenerator->expects($this->any())
->method('getBaseURL')
->willReturn('http://localhost/');
- $this->urlGenerator->expects($this->at(1))
- ->method('getAbsoluteURL')
- ->with('/index.php/settings/user')
- ->willReturn('http://localhost/index.php/settings/user');
- $this->urlGenerator->expects($this->at(3))
+ $this->urlGenerator->expects($this->exactly(2))
->method('getAbsoluteURL')
- ->with('/core/img/settings.svg')
- ->willReturn('http://localhost/core/img/settings.svg');
+ ->withConsecutive(
+ ['/index.php/settings/user'],
+ ['/core/img/settings.svg']
+ )
+ ->willReturnOnConsecutiveCalls(
+ 'http://localhost/index.php/settings/user',
+ 'http://localhost/core/img/settings.svg'
+ );
$actual = $this->controller->getSettingsNavigation($absolute);
$this->assertInstanceOf(DataResponse::class, $actual);
$this->assertEquals('http://localhost/index.php/settings/user', $actual->getData()[0]['href']);