|
|
|
|
@ -93,7 +93,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetApp($app) { |
|
|
|
|
$this->assertSame('', $this->notification->getApp()); |
|
|
|
|
$this->notification->setApp($app); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setApp($app)); |
|
|
|
|
$this->assertSame($app, $this->notification->getApp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -121,7 +121,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetUser($user) { |
|
|
|
|
$this->assertSame('', $this->notification->getUser()); |
|
|
|
|
$this->notification->setUser($user); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setUser($user)); |
|
|
|
|
$this->assertSame($user, $this->notification->getUser()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -149,7 +149,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetTimestamp($timestamp) { |
|
|
|
|
$this->assertSame(0, $this->notification->getTimestamp()); |
|
|
|
|
$this->notification->setTimestamp($timestamp); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setTimestamp($timestamp)); |
|
|
|
|
$this->assertSame($timestamp, $this->notification->getTimestamp()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -182,7 +182,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
public function testSetObject($type, $id) { |
|
|
|
|
$this->assertSame('', $this->notification->getObjectType()); |
|
|
|
|
$this->assertSame(0, $this->notification->getObjectId()); |
|
|
|
|
$this->notification->setObject($type, $id); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setObject($type, $id)); |
|
|
|
|
$this->assertSame($type, $this->notification->getObjectType()); |
|
|
|
|
$this->assertSame($id, $this->notification->getObjectId()); |
|
|
|
|
} |
|
|
|
|
@ -233,7 +233,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
public function testSetSubject($subject, $parameters) { |
|
|
|
|
$this->assertSame('', $this->notification->getSubject()); |
|
|
|
|
$this->assertSame([], $this->notification->getSubjectParameters()); |
|
|
|
|
$this->notification->setSubject($subject, $parameters); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setSubject($subject, $parameters)); |
|
|
|
|
$this->assertSame($subject, $this->notification->getSubject()); |
|
|
|
|
$this->assertSame($parameters, $this->notification->getSubjectParameters()); |
|
|
|
|
} |
|
|
|
|
@ -262,7 +262,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetParsedSubject($subject) { |
|
|
|
|
$this->assertSame('', $this->notification->getParsedSubject()); |
|
|
|
|
$this->notification->setParsedSubject($subject); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setParsedSubject($subject)); |
|
|
|
|
$this->assertSame($subject, $this->notification->getParsedSubject()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -296,7 +296,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
public function testSetMessage($message, $parameters) { |
|
|
|
|
$this->assertSame('', $this->notification->getMessage()); |
|
|
|
|
$this->assertSame([], $this->notification->getMessageParameters()); |
|
|
|
|
$this->notification->setMessage($message, $parameters); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setMessage($message, $parameters)); |
|
|
|
|
$this->assertSame($message, $this->notification->getMessage()); |
|
|
|
|
$this->assertSame($parameters, $this->notification->getMessageParameters()); |
|
|
|
|
} |
|
|
|
|
@ -325,7 +325,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetParsedMessage($message) { |
|
|
|
|
$this->assertSame('', $this->notification->getParsedMessage()); |
|
|
|
|
$this->notification->setParsedMessage($message); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setParsedMessage($message)); |
|
|
|
|
$this->assertSame($message, $this->notification->getParsedMessage()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -353,7 +353,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
*/ |
|
|
|
|
public function testSetLink($link) { |
|
|
|
|
$this->assertSame('', $this->notification->getLink()); |
|
|
|
|
$this->notification->setLink($link); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->setLink($link)); |
|
|
|
|
$this->assertSame($link, $this->notification->getLink()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -387,7 +387,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
$action->expects($this->never()) |
|
|
|
|
->method('isValidParsed'); |
|
|
|
|
|
|
|
|
|
$this->notification->addAction($action); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->addAction($action)); |
|
|
|
|
|
|
|
|
|
$this->assertEquals([$action], $this->notification->getActions()); |
|
|
|
|
$this->assertEquals([], $this->notification->getParsedActions()); |
|
|
|
|
@ -422,7 +422,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
->method('isPrimary') |
|
|
|
|
->willReturn(true); |
|
|
|
|
|
|
|
|
|
$this->notification->addAction($action); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->addAction($action)); |
|
|
|
|
|
|
|
|
|
$this->setExpectedException('\InvalidArgumentException'); |
|
|
|
|
$this->notification->addAction($action); |
|
|
|
|
@ -439,7 +439,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
$action->expects($this->never()) |
|
|
|
|
->method('isValid'); |
|
|
|
|
|
|
|
|
|
$this->notification->addParsedAction($action); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->addParsedAction($action)); |
|
|
|
|
|
|
|
|
|
$this->assertEquals([$action], $this->notification->getParsedActions()); |
|
|
|
|
$this->assertEquals([], $this->notification->getActions()); |
|
|
|
|
@ -474,7 +474,7 @@ class NotificationTest extends TestCase { |
|
|
|
|
->method('isPrimary') |
|
|
|
|
->willReturn(true); |
|
|
|
|
|
|
|
|
|
$this->notification->addParsedAction($action); |
|
|
|
|
$this->assertSame($this->notification, $this->notification->addParsedAction($action)); |
|
|
|
|
|
|
|
|
|
$this->setExpectedException('\InvalidArgumentException'); |
|
|
|
|
$this->notification->addParsedAction($action); |
|
|
|
|
|