1313use NotificationChannels \Twilio \TwilioChannel ;
1414use NotificationChannels \Twilio \TwilioConfig ;
1515use NotificationChannels \Twilio \TwilioSmsMessage ;
16+ use PHPUnit \Framework \Attributes \Test ;
1617use Twilio \Exceptions \RestException ;
1718
1819class TwilioChannelTest extends MockeryTestCase
@@ -37,7 +38,7 @@ protected function setUp(): void
3738 $ this ->channel = new TwilioChannel ($ this ->twilio , $ this ->dispatcher );
3839 }
3940
40- /** @test */
41+ #[Test]
4142 public function it_will_not_send_a_message_if_not_enabled ()
4243 {
4344 $ notifiable = new Notifiable ;
@@ -54,7 +55,7 @@ public function it_will_not_send_a_message_if_not_enabled()
5455 $ this ->assertNull ($ result );
5556 }
5657
57- /** @test */
58+ #[Test]
5859 public function it_will_not_send_a_message_without_known_receiver ()
5960 {
6061 $ notifiable = new Notifiable ;
@@ -75,7 +76,7 @@ public function it_will_not_send_a_message_without_known_receiver()
7576 $ this ->assertNull ($ result );
7677 }
7778
78- /** @test */
79+ #[Test]
7980 public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_the_notifiable ()
8081 {
8182 $ notifiable = new NotifiableWithMethod ;
@@ -91,7 +92,7 @@ public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_
9192 $ this ->channel ->send ($ notifiable , $ notification );
9293 }
9394
94- /** @test */
95+ #[Test]
9596 public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_the_notifiable_if_it_uses_the_twilio_channel_explicitly ()
9697 {
9798 $ notifiable = new NotifiableWithTwilioChannel ;
@@ -107,7 +108,7 @@ public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_
107108 $ this ->channel ->send ($ notifiable , $ notification );
108109 }
109110
110- /** @test */
111+ #[Test]
111112 public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifiable ()
112113 {
113114 $ notifiable = new NotifiableWithAttribute ;
@@ -123,7 +124,7 @@ public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifia
123124 $ this ->channel ->send ($ notifiable , $ notification );
124125 }
125126
126- /** @test */
127+ #[Test]
127128 public function it_will_convert_a_string_to_a_sms_message ()
128129 {
129130 $ notifiable = new NotifiableWithAttribute ;
@@ -138,7 +139,7 @@ public function it_will_convert_a_string_to_a_sms_message()
138139 $ this ->channel ->send ($ notifiable , $ notification );
139140 }
140141
141- /** @test */
142+ #[Test]
142143 public function it_will_fire_an_event_in_case_of_an_invalid_message ()
143144 {
144145 $ notifiable = new NotifiableWithAttribute ;
@@ -160,7 +161,7 @@ public function it_will_fire_an_event_in_case_of_an_invalid_message()
160161 $ this ->channel ->send ($ notifiable , $ notification );
161162 }
162163
163- /** @test */
164+ #[Test]
164165 public function it_will_ignore_specific_error_codes ()
165166 {
166167 $ notifiable = new NotifiableWithAttribute ;
@@ -184,7 +185,7 @@ public function it_will_ignore_specific_error_codes()
184185 $ this ->channel ->send ($ notifiable , $ notification );
185186 }
186187
187- /** @test */
188+ #[Test]
188189 public function it_will_rethrow_non_ignored_error_codes ()
189190 {
190191 $ notifiable = new NotifiableWithAttribute ;
@@ -210,7 +211,7 @@ public function it_will_rethrow_non_ignored_error_codes()
210211 $ this ->channel ->send ($ notifiable , $ notification );
211212 }
212213
213- /** @test */
214+ #[Test]
214215 public function it_will_ignore_all_error_codes ()
215216 {
216217 $ notifiable = new NotifiableWithAttribute ;
@@ -232,7 +233,7 @@ public function it_will_ignore_all_error_codes()
232233 $ this ->channel ->send ($ notifiable , $ notification );
233234 }
234235
235- /** @test */
236+ #[Test]
236237 public function it_will_send_using_alphanumeric_if_notifiable_can_receive ()
237238 {
238239 $ notifiable = new NotifiableWithAlphanumericSender ;
0 commit comments