summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2017-04-11 09:22:46 +0200
committerChristoph Wurst <christoph@winzerhof-wurst.at>2017-04-11 09:22:46 +0200
commita309d7c2802f654c5c13b76672620f438cffb9be (patch)
tree3dcd093fecbfa5a388ef6c4147688c69362c2117 /tests
parent07f1bb1013f1427d14d4b4c3b93a7e4fce4a261f (diff)
Use absolute path for icon url
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/ContactsMenu/Provider/DetailsProviderTest.php25
1 files changed, 16 insertions, 9 deletions
diff --git a/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php b/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
index 85f34cb4..26f00575 100644
--- a/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
+++ b/tests/unit/ContactsMenu/Provider/DetailsProviderTest.php
@@ -58,16 +58,23 @@ class DetailsProviderTest extends PHPUnit_Framework_TestCase {
$entry->expects($this->exactly(2))
->method('getProperty')
->will($this->returnValueMap([
- ['UID', 'e3a71614-c602-4eb5-9994-47eec551542b'],
- ['isLocalSystemBook', null]
- ]));
+ ['UID', 'e3a71614-c602-4eb5-9994-47eec551542b'],
+ ['isLocalSystemBook', null]
+ ]));
$this->urlGenerator->expects($this->once())
+ ->method('imagePath')
+ ->with('core', 'actions/info.svg')
+ ->willReturn('core/img/actions/info.svg');
+ $iconUrl = 'https://example.com/core/img/actions/info.svg';
+ $this->urlGenerator->expects($this->exactly(2))
->method('getAbsoluteURL')
- ->with('/index.php/apps/contacts')
- ->willReturn('cloud.example.com/index.php/apps/contacts');
+ ->will($this->returnValueMap([
+ ['/index.php/apps/contacts', 'cloud.example.com/index.php/apps/contacts'],
+ ['core/img/actions/info.svg', $iconUrl],
+ ]));
$this->actionFactory->expects($this->once())
->method('newLinkAction')
- ->with($this->equalTo('icon-info'), $this->equalTo('Details'), $this->equalTo('cloud.example.com/index.php/apps/contacts'))
+ ->with($this->equalTo($iconUrl), $this->equalTo('Details'), $this->equalTo('cloud.example.com/index.php/apps/contacts'))
->willReturn($action);
$action->expects($this->once())
->method('setPriority')
@@ -96,9 +103,9 @@ class DetailsProviderTest extends PHPUnit_Framework_TestCase {
$entry->expects($this->exactly(2))
->method('getProperty')
->will($this->returnValueMap([
- ['UID', 1234],
- ['isLocalSystemBook', true]
- ]));
+ ['UID', 1234],
+ ['isLocalSystemBook', true]
+ ]));
$entry->expects($this->never())
->method('addAction');