diff options
author | Joas Schilling <coding@schilljs.com> | 2016-10-14 17:57:34 +0300 |
---|---|---|
committer | Joas Schilling <coding@schilljs.com> | 2016-10-27 16:51:00 +0300 |
commit | 18c0d7258d6110587356f79b49dcc2bf0a2368c1 (patch) | |
tree | 2f40c98d866696107ba11d9340cd917dc8d7bcd4 /tests/Unit | |
parent | 1c7435db9aebc02cb6abeb123ddbca95f4ea9f1d (diff) |
Add support for Rich Object Strings
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'tests/Unit')
-rw-r--r-- | tests/Unit/Controller/EndpointControllerTest.php | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/Unit/Controller/EndpointControllerTest.php b/tests/Unit/Controller/EndpointControllerTest.php index 978e827..e6fbf28 100644 --- a/tests/Unit/Controller/EndpointControllerTest.php +++ b/tests/Unit/Controller/EndpointControllerTest.php @@ -383,8 +383,8 @@ class EndpointControllerTest extends TestCase { public function dataNotificationToArray() { return [ - [42, 'app1', 'user1', 1234, 'type1', 42, 'subject1', 'message1', 'link1', 'icon1', [], []], - [1337, 'app2', 'user2', 1337, 'type2', 21, 'subject2', 'message2', 'link2', 'icon2', [ + [42, 'app1', 'user1', 1234, 'type1', 42, 'subject1', '', [], 'message1', 'link1', 'icon1', [], []], + [1337, 'app2', 'user2', 1337, 'type2', 21, 'subject2', 'richSubject 2', ['richSubject param'], 'message2', 'link2', 'icon2', [ $this->getMockBuilder(IAction::class) ->getMock(), $this->getMockBuilder(IAction::class) @@ -403,13 +403,15 @@ class EndpointControllerTest extends TestCase { * @param string $objectType * @param int $objectId * @param string $subject + * @param string $subjectRich + * @param array $subjectRichParameters * @param string $message * @param string $link * @param string $icon * @param array $actions * @param array $actionsExpected */ - public function testNotificationToArray($id, $app, $user, $timestamp, $objectType, $objectId, $subject, $message, $link, $icon, array $actions, array $actionsExpected) { + public function testNotificationToArray($id, $app, $user, $timestamp, $objectType, $objectId, $subject, $subjectRich, $subjectRichParameters, $message, $link, $icon, array $actions, array $actionsExpected) { $notification = $this->getMockBuilder(INotification::class) ->getMock(); @@ -440,6 +442,14 @@ class EndpointControllerTest extends TestCase { ->willReturn($subject); $notification->expects($this->once()) + ->method('getRichSubject') + ->willReturn($subjectRich); + + $notification->expects($this->once()) + ->method('getRichSubjectParameters') + ->willReturn($subjectRichParameters); + + $notification->expects($this->once()) ->method('getParsedMessage') ->willReturn($message); @@ -470,6 +480,8 @@ class EndpointControllerTest extends TestCase { 'object_type' => $objectType, 'object_id' => $objectId, 'subject' => $subject, + 'subjectRich' => $subjectRich, + 'subjectRichParameters' => $subjectRichParameters, 'message' => $message, 'link' => $link, 'icon' => $icon, |