Skip to content

Commit c2640f4

Browse files
committed
Twilio channel test
1 parent a731d4c commit c2640f4

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/TwilioChannelTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,22 @@ public function it_will_fire_an_event_in_case_of_an_invalid_message()
110110

111111
$this->channel->send($notifiable, $notification);
112112
}
113+
114+
/** @test */
115+
public function it_will_send_using_alphanumeric_if_notifiable_can_receive()
116+
{
117+
$notifiable = new NotifiableWithAlphanumericSender();
118+
$notification = Mockery::mock(Notification::class);
119+
120+
$message = new TwilioSmsMessage('Message text');
121+
$notification->shouldReceive('toTwilio')->andReturn($message);
122+
123+
$this->twilio->shouldReceive('sendMessage')
124+
->atLeast()->once()
125+
->with($message, '+33333333333', true);
126+
127+
$this->channel->send($notifiable, $notification);
128+
}
113129
}
114130

115131
class Notifiable

0 commit comments

Comments
 (0)