9
9
use Fouladgar \OTP \Tests \Models \OTPNotifiableUser ;
10
10
use Illuminate \Support \Facades \Cache ;
11
11
use Illuminate \Support \Facades \Notification ;
12
- use Throwable ;
13
12
14
13
class OTPBrokerTest extends TestCase
15
14
{
@@ -76,7 +75,7 @@ public function it_can_send_token_with_using_default_channel(): void
76
75
77
76
Notification::assertSentTo (
78
77
$ user ,
79
- fn (OTPNotification $ notification , $ channels ) => $ channels [0 ] == config ('otp.channel ' )
78
+ fn (OTPNotification $ notification , $ channels ) => $ channels [0 ] == config ('otp.channel ' )
80
79
);
81
80
}
82
81
@@ -93,7 +92,7 @@ public function it_can_send_token_with_using_specified_channels(): void
93
92
94
93
Notification::assertSentTo (
95
94
$ user ,
96
- fn (OTPNotification $ notification , $ channels ) => $ channels == $ useChannels
95
+ fn (OTPNotification $ notification , $ channels ) => $ channels == $ useChannels
97
96
);
98
97
}
99
98
@@ -109,7 +108,7 @@ public function it_can_send_token_with_using_extended_channel(): void
109
108
110
109
Notification::assertSentTo (
111
110
$ user ,
112
- fn (OTPNotification $ notification , $ channels ) => $ channels == ['otp_sms ' ]
111
+ fn (OTPNotification $ notification , $ channels ) => $ channels == ['otp_sms ' ]
113
112
);
114
113
}
115
114
@@ -125,7 +124,7 @@ public function it_can_send_token_with_using_custom_channel(): void
125
124
126
125
Notification::assertSentTo (
127
126
$ user ,
128
- fn (OTPNotification $ notification , $ channels ) => $ channels == [CustomOTPChannel::class]
127
+ fn (OTPNotification $ notification , $ channels ) => $ channels == [CustomOTPChannel::class]
129
128
);
130
129
}
131
130
@@ -278,7 +277,8 @@ public function it_can_set_multiple_indicators(): void
278
277
$ this ->assertNotEmpty (Cache::get (self ::MOBILE ));
279
278
280
279
$ user = OTP ()->onlyConfirmToken ()->indicator ($ secondIndicator )->validate (
281
- self ::MOBILE , Cache::get ($ secondIndicator . self ::MOBILE )['token ' ]
280
+ self ::MOBILE ,
281
+ Cache::get ($ secondIndicator . self ::MOBILE )['token ' ]
282
282
);
283
283
284
284
$ this ->assertInstanceOf (OTPNotifiable::class, $ user );
0 commit comments