77use NotificationChannels \Twilio \Exceptions \InvalidConfigException ;
88use NotificationChannels \Twilio \Tests \IntegrationTestCase ;
99use NotificationChannels \Twilio \TwilioChannel ;
10+ use NotificationChannels \Twilio \TwilioConfig ;
11+ use NotificationChannels \Twilio \TwilioProvider ;
12+ use Twilio \Rest \Client ;
1013
1114class TwilioProviderTest extends IntegrationTestCase
1215{
13- public function testThatApplicationCannotCreateChannelWithoutConfig ()
16+ /** @test */
17+ public function it_cannot_create_the_application_without_config ()
1418 {
1519 $ this ->expectException (InvalidConfigException::class);
1620
1721 $ this ->app ->get (TwilioChannel::class);
1822 }
1923
20- public function testThatApplicationCannotCreateChannelWithoutSid ()
24+ /** @test */
25+ public function it_cannot_create_the_application_without_sid ()
2126 {
2227 $ this ->app ['config ' ]->set ('twilio-notification-channel.username ' , 'test ' );
2328 $ this ->app ['config ' ]->set ('twilio-notification-channel.username ' , 'password ' );
@@ -26,12 +31,23 @@ public function testThatApplicationCannotCreateChannelWithoutSid()
2631 $ this ->app ->get (TwilioChannel::class);
2732 }
2833
29- public function testThatApplicationCreatesChannelWithConfig ()
34+ /** @test */
35+ public function it_can_create_the_application_with_sid ()
3036 {
3137 $ this ->app ['config ' ]->set ('twilio-notification-channel.username ' , 'test ' );
3238 $ this ->app ['config ' ]->set ('twilio-notification-channel.password ' , 'password ' );
3339 $ this ->app ['config ' ]->set ('twilio-notification-channel.account_sid ' , '1234 ' );
3440
3541 $ this ->assertInstanceOf (TwilioChannel::class, $ this ->app ->get (TwilioChannel::class));
3642 }
43+
44+ /** @test */
45+ public function it_provides_three_classes ()
46+ {
47+ $ provides = (new TwilioProvider ($ this ->app ))->provides ();
48+
49+ $ this ->assertTrue (in_array (TwilioChannel::class, $ provides ));
50+ $ this ->assertTrue (in_array (TwilioConfig::class, $ provides ));
51+ $ this ->assertTrue (in_array (Client::class, $ provides ));
52+ }
3753}
0 commit comments