13
13
use NotificationChannels \Twilio \TwilioChannel ;
14
14
use NotificationChannels \Twilio \TwilioConfig ;
15
15
use NotificationChannels \Twilio \TwilioSmsMessage ;
16
+ use PHPUnit \Framework \Attributes \Test ;
16
17
use Twilio \Exceptions \RestException ;
17
18
18
19
class TwilioChannelTest extends MockeryTestCase
@@ -37,7 +38,7 @@ protected function setUp(): void
37
38
$ this ->channel = new TwilioChannel ($ this ->twilio , $ this ->dispatcher );
38
39
}
39
40
40
- /** @test */
41
+ #[Test]
41
42
public function it_will_not_send_a_message_if_not_enabled ()
42
43
{
43
44
$ notifiable = new Notifiable ;
@@ -54,7 +55,7 @@ public function it_will_not_send_a_message_if_not_enabled()
54
55
$ this ->assertNull ($ result );
55
56
}
56
57
57
- /** @test */
58
+ #[Test]
58
59
public function it_will_not_send_a_message_without_known_receiver ()
59
60
{
60
61
$ notifiable = new Notifiable ;
@@ -75,7 +76,7 @@ public function it_will_not_send_a_message_without_known_receiver()
75
76
$ this ->assertNull ($ result );
76
77
}
77
78
78
- /** @test */
79
+ #[Test]
79
80
public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_the_notifiable ()
80
81
{
81
82
$ notifiable = new NotifiableWithMethod ;
@@ -91,7 +92,7 @@ public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_
91
92
$ this ->channel ->send ($ notifiable , $ notification );
92
93
}
93
94
94
- /** @test */
95
+ #[Test]
95
96
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 ()
96
97
{
97
98
$ notifiable = new NotifiableWithTwilioChannel ;
@@ -107,7 +108,7 @@ public function it_will_send_a_sms_message_to_the_result_of_the_route_method_of_
107
108
$ this ->channel ->send ($ notifiable , $ notification );
108
109
}
109
110
110
- /** @test */
111
+ #[Test]
111
112
public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifiable ()
112
113
{
113
114
$ notifiable = new NotifiableWithAttribute ;
@@ -123,7 +124,7 @@ public function it_will_make_a_call_to_the_phone_number_attribute_of_the_notifia
123
124
$ this ->channel ->send ($ notifiable , $ notification );
124
125
}
125
126
126
- /** @test */
127
+ #[Test]
127
128
public function it_will_convert_a_string_to_a_sms_message ()
128
129
{
129
130
$ notifiable = new NotifiableWithAttribute ;
@@ -138,7 +139,7 @@ public function it_will_convert_a_string_to_a_sms_message()
138
139
$ this ->channel ->send ($ notifiable , $ notification );
139
140
}
140
141
141
- /** @test */
142
+ #[Test]
142
143
public function it_will_fire_an_event_in_case_of_an_invalid_message ()
143
144
{
144
145
$ notifiable = new NotifiableWithAttribute ;
@@ -160,7 +161,7 @@ public function it_will_fire_an_event_in_case_of_an_invalid_message()
160
161
$ this ->channel ->send ($ notifiable , $ notification );
161
162
}
162
163
163
- /** @test */
164
+ #[Test]
164
165
public function it_will_ignore_specific_error_codes ()
165
166
{
166
167
$ notifiable = new NotifiableWithAttribute ;
@@ -184,7 +185,7 @@ public function it_will_ignore_specific_error_codes()
184
185
$ this ->channel ->send ($ notifiable , $ notification );
185
186
}
186
187
187
- /** @test */
188
+ #[Test]
188
189
public function it_will_rethrow_non_ignored_error_codes ()
189
190
{
190
191
$ notifiable = new NotifiableWithAttribute ;
@@ -210,7 +211,7 @@ public function it_will_rethrow_non_ignored_error_codes()
210
211
$ this ->channel ->send ($ notifiable , $ notification );
211
212
}
212
213
213
- /** @test */
214
+ #[Test]
214
215
public function it_will_ignore_all_error_codes ()
215
216
{
216
217
$ notifiable = new NotifiableWithAttribute ;
@@ -232,7 +233,7 @@ public function it_will_ignore_all_error_codes()
232
233
$ this ->channel ->send ($ notifiable , $ notification );
233
234
}
234
235
235
- /** @test */
236
+ #[Test]
236
237
public function it_will_send_using_alphanumeric_if_notifiable_can_receive ()
237
238
{
238
239
$ notifiable = new NotifiableWithAlphanumericSender ;
0 commit comments