summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-12-11 15:35:18 +0100
committerJulius Härtl <jus@bitgrid.net>2020-12-11 16:12:49 +0100
commit6d7fd245a57d81746ac0f0950b4a13ca9d483ca1 (patch)
tree7da96f74f116842249e24be9bb31b971e8fdd947 /tests
parent8d3be14cbcf1815faf3bea4daa7cb256c7b660d1 (diff)
Fix generating the redirect url
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/Controller/ContactsControllerTest.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/unit/Controller/ContactsControllerTest.php b/tests/unit/Controller/ContactsControllerTest.php
index c55cc1f2..e618bba9 100644
--- a/tests/unit/Controller/ContactsControllerTest.php
+++ b/tests/unit/Controller/ContactsControllerTest.php
@@ -63,12 +63,17 @@ class ContactsControllerTest extends TestCase {
->willReturn('All contacts');
$this->urlGenerator->expects($this->once())
+ ->method('linkToRoute')
+ ->with('contacts.page.index')
+ ->willReturn('/index.php/apps/contacts/');
+
+ $this->urlGenerator->expects($this->once())
->method('getAbsoluteURL')
- ->with('/apps/contacts/All contacts/' . $contact)
- ->willReturn('/apps/contacts/All contacts/' . $contact);
+ ->with('/index.php/apps/contacts/All contacts/' . $contact)
+ ->willReturn('/index.php/apps/contacts/All contacts/' . $contact);
$result = $this->controller->direct('uuid~addressbook');
$this->assertTrue($result instanceof RedirectResponse);
- $this->assertEquals('/apps/contacts/All contacts/' . $contact, $result->getRedirectURL());
+ $this->assertEquals('/index.php/apps/contacts/All contacts/' . $contact, $result->getRedirectURL());
}
}