File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff 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+ }
You can’t perform that action at this time.
0 commit comments