Skip to content

Commit 67f588f

Browse files
committed
String notification test update
1 parent 1b2e545 commit 67f588f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

tests/MessagebirdChannelTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ class MessagebirdChannelTest extends PHPUnit_Framework_TestCase
1616
public function setUp()
1717
{
1818
$this->notification = new TestNotification;
19+
$this->string_notification = new TestStringNotification;
1920
$this->notifiable = new TestNotifiable;
2021
$this->guzzle = Mockery::mock(new Client());
2122
$this->client = Mockery::mock(new MessagebirdClient($this->guzzle, 'test_ek1qBbKbHoA20gZHM40RBjxzX'));
@@ -46,7 +47,7 @@ public function test_it_shares_message()
4647
public function if_string_message_can_be_send()
4748
{
4849
$this->client->shouldReceive('send')->once();
49-
$this->channel->send('Test by string', $this->notification);
50+
$this->channel->send($this->notifiable, $this->string_notification);
5051
}
5152
}
5253

@@ -67,3 +68,11 @@ public function toMessagebird($notifiable)
6768
return (new MessagebirdMessage('Message content'))->setOriginator('APPNAME')->setRecipients('31650520659');
6869
}
6970
}
71+
72+
class TestStringNotification extends Notification
73+
{
74+
public function toMessagebird($notifiable)
75+
{
76+
return 'Test by string';
77+
}
78+
}

0 commit comments

Comments
 (0)