1010use NotificationChannels \AwsSns \Sns ;
1111use NotificationChannels \AwsSns \SnsChannel ;
1212use NotificationChannels \AwsSns \SnsMessage ;
13- use PHPUnit \Framework \TestCase ;
1413
1514class SnsChannelTest extends TestCase
1615{
17- use Mockery \Adapter \Phpunit \MockeryPHPUnitIntegration;
18-
1916 /**
2017 * @var Mockery\LegacyMockInterface|Mockery\MockInterface|Sns
2118 */
@@ -40,25 +37,24 @@ protected function setUp(): void
4037 $ this ->channel = new SnsChannel ($ this ->sns , $ this ->dispatcher );
4138 }
4239
43- /** @test */
44- public function it_will_not_send_a_message_without_known_receiver ()
40+ public function test_it_will_not_send_a_message_without_known_receiver ()
4541 {
46- $ notifiable = new Notifiable () ;
42+ $ notifiable = new Notifiable ;
4743 $ notification = Mockery::mock (Notification::class);
4844
4945 $ this ->dispatcher ->shouldReceive ('dispatch ' )
50- ->atLeast ()->once ()
46+ ->atLeast ()
47+ ->once ()
5148 ->with (Mockery::type (NotificationFailed::class));
5249
5350 $ result = $ this ->channel ->send ($ notifiable , $ notification );
5451
5552 $ this ->assertNull ($ result );
5653 }
5754
58- /** @test */
59- public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_the_notifiable ()
55+ public function test_it_will_send_a_sms_message_to_the_result_of_the_route_method_of_the_notifiable ()
6056 {
61- $ notifiable = new NotifiableWithMethod () ;
57+ $ notifiable = new NotifiableWithMethod ;
6258 $ message = new SnsMessage ('Message text ' );
6359
6460 $ notification = Mockery::mock (Notification::class);
@@ -71,10 +67,9 @@ public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_
7167 $ this ->channel ->send ($ notifiable , $ notification );
7268 }
7369
74- /** @test */
75- public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifiable ()
70+ public function test_it_will_make_a_call_to_the_phone_number_attribute_of_the_notifiable ()
7671 {
77- $ notifiable = new NotifiableWithAttribute () ;
72+ $ notifiable = new NotifiableWithAttribute ;
7873 $ message = new SnsMessage ('Some content to send ' );
7974
8075 $ notification = Mockery::mock (Notification::class);
@@ -87,10 +82,9 @@ public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifia
8782 $ this ->channel ->send ($ notifiable , $ notification );
8883 }
8984
90- /** @test */
91- public function it_will_convert_a_string_to_a_sms_message ()
85+ public function test_it_will_convert_a_string_to_a_sms_message ()
9286 {
93- $ notifiable = new NotifiableWithAttribute () ;
87+ $ notifiable = new NotifiableWithAttribute ;
9488
9589 $ notification = Mockery::mock (Notification::class);
9690 $ notification ->shouldReceive ('toSns ' )->andReturn ('Message text ' );
@@ -102,10 +96,9 @@ public function it_will_convert_a_string_to_a_sms_message()
10296 $ this ->channel ->send ($ notifiable , $ notification );
10397 }
10498
105- /** @test */
106- public function it_will_dispatch_an_event_in_case_of_an_invalid_message ()
99+ public function test_it_will_dispatch_an_event_in_case_of_an_invalid_message ()
107100 {
108- $ notifiable = new NotifiableWithAttribute () ;
101+ $ notifiable = new NotifiableWithAttribute ;
109102
110103 $ notification = Mockery::mock (Notification::class);
111104 $ notification ->shouldReceive ('toSns ' )->andReturn (-1 );
@@ -117,8 +110,7 @@ public function it_will_dispatch_an_event_in_case_of_an_invalid_message()
117110 $ this ->channel ->send ($ notifiable , $ notification );
118111 }
119112
120- /** @test */
121- public function it_will_send_a_sms_to_an_anonymous_notifiable ()
113+ public function test_it_will_send_a_sms_to_an_anonymous_notifiable ()
122114 {
123115 $ notification = Mockery::mock (Notification::class);
124116 $ notification ->shouldReceive ('toSns ' )->andReturn ('Message text ' );
@@ -140,6 +132,7 @@ class Notifiable
140132
141133 public function routeNotificationFor ()
142134 {
135+ //
143136 }
144137}
145138
@@ -157,5 +150,6 @@ class NotifiableWithAttribute
157150
158151 public function routeNotificationFor ()
159152 {
153+ //
160154 }
161155}
0 commit comments