@@ -22,8 +22,8 @@ class TwoFactorAuthenticationTest extends TestCase
2222 public function test_returns_authenticatable (): void
2323 {
2424 $ user = UserTwoFactorStub::create ([
25- 'name ' => 'foo ' ,
26- 'email ' => 'foo@test.com ' ,
25+ 'name ' => 'foo ' ,
26+ 'email ' => 'foo@test.com ' ,
2727 'password ' => UserStub::PASSWORD_SECRET ,
2828 ]);
2929
@@ -65,7 +65,7 @@ public function test_flushes_authentication(): void
6565 ->withRecovery ()->withSafeDevices ()
6666 ->create ([
6767 'authenticatable_type ' => 'test ' ,
68- 'authenticatable_id ' => 9 ,
68+ 'authenticatable_id ' => 9 ,
6969 ]);
7070
7171 static ::assertNotNull ($ old = $ tfa ->shared_secret );
@@ -142,7 +142,7 @@ public function test_validate_code(): void
142142 {
143143 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
144144 'shared_secret ' => static ::SECRET ,
145- 'window ' => 0 ,
145+ 'window ' => 0 ,
146146 ]);
147147
148148 $ this ->travelTo (Date::create (2020 , 1 , 1 , 20 , 30 , 0 ));
@@ -161,7 +161,7 @@ public function test_validate_code_with_window(): void
161161 {
162162 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
163163 'shared_secret ' => static ::SECRET ,
164- 'window ' => 1 ,
164+ 'window ' => 1 ,
165165 ]);
166166
167167 $ this ->travelTo (Date::create (2020 , 1 , 1 , 20 , 30 , 0 ));
@@ -201,7 +201,7 @@ public function test_contains_unused_recovery_codes(): void
201201 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
202202 'recovery_codes ' => collect ([
203203 [
204- 'code ' => '2G5oP36 ' ,
204+ 'code ' => '2G5oP36 ' ,
205205 'used_at ' => 'anything not null ' ,
206206 ],
207207 ]),
@@ -252,10 +252,10 @@ public function test_serializes_to_uri(): void
252252 $ this ->app ->make ('config ' )->set ('two-factor.issuer ' , 'quz ' );
253253
254254 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
255- 'label ' => 'test@foo.com ' ,
255+ 'label ' => 'test@foo.com ' ,
256256 'shared_secret ' => static ::SECRET ,
257- 'algorithm ' => 'sHa256 ' ,
258- 'digits ' => 14 ,
257+ 'algorithm ' => 'sHa256 ' ,
258+ 'digits ' => 14 ,
259259 ]);
260260
261261 $ uri = 'otpauth://totp/quz%3Atest@foo.com?issuer=quz&label=test%40foo.com&secret=KS72XBTN5PEBGX2IWBMVW44LXHPAQ7L3&algorithm=SHA256&digits=14 ' ;
@@ -268,10 +268,10 @@ public function test_serializes_to_qr_and_renders_to_qr(): void
268268 $ this ->app ->make ('config ' )->set ('two-factor.issuer ' , 'quz ' );
269269
270270 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
271- 'label ' => 'test@foo.com ' ,
271+ 'label ' => 'test@foo.com ' ,
272272 'shared_secret ' => static ::SECRET ,
273- 'algorithm ' => 'sHa256 ' ,
274- 'digits ' => 14 ,
273+ 'algorithm ' => 'sHa256 ' ,
274+ 'digits ' => 14 ,
275275 ]);
276276
277277 static ::assertStringEqualsFile (__DIR__ .'/../Stubs/QrStub.svg ' , $ tfa ->toQr ());
@@ -289,10 +289,10 @@ public function test_serializes_to_qr_and_renders_to_qr_with_custom_values(): vo
289289 ]);
290290
291291 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
292- 'label ' => 'test@foo.com ' ,
292+ 'label ' => 'test@foo.com ' ,
293293 'shared_secret ' => static ::SECRET ,
294- 'algorithm ' => 'sHa256 ' ,
295- 'digits ' => 14 ,
294+ 'algorithm ' => 'sHa256 ' ,
295+ 'digits ' => 14 ,
296296 ]);
297297
298298 static ::assertStringEqualsFile (__DIR__ .'/../Stubs/CustomQrStub.svg ' , $ tfa ->toQr ());
@@ -304,10 +304,10 @@ public function test_serializes_uri_to_json(): void
304304 $ this ->app ->make ('config ' )->set ('two-factor.issuer ' , 'quz ' );
305305
306306 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
307- 'label ' => 'test@foo.com ' ,
307+ 'label ' => 'test@foo.com ' ,
308308 'shared_secret ' => static ::SECRET ,
309- 'algorithm ' => 'sHa256 ' ,
310- 'digits ' => 14 ,
309+ 'algorithm ' => 'sHa256 ' ,
310+ 'digits ' => 14 ,
311311 ]);
312312
313313 $ uri = '"otpauth:\/\/totp\/quz%3Atest@foo.com?issuer=quz&label=test%40foo.com&secret=KS72XBTN5PEBGX2IWBMVW44LXHPAQ7L3&algorithm=SHA256&digits=14" ' ;
@@ -319,10 +319,10 @@ public function test_serializes_uri_to_json(): void
319319 public function test_uses_app_name_as_issuer (): void
320320 {
321321 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
322- 'label ' => 'test@foo.com ' ,
322+ 'label ' => 'test@foo.com ' ,
323323 'shared_secret ' => static ::SECRET ,
324- 'algorithm ' => 'sHa256 ' ,
325- 'digits ' => 14 ,
324+ 'algorithm ' => 'sHa256 ' ,
325+ 'digits ' => 14 ,
326326 ]);
327327
328328 $ uri = 'otpauth://totp/Laravel%3Atest@foo.com?issuer=Laravel&label=test%40foo.com&secret=KS72XBTN5PEBGX2IWBMVW44LXHPAQ7L3&algorithm=SHA256&digits=14 ' ;
@@ -335,10 +335,10 @@ public function test_changes_issuer(): void
335335 $ this ->app ->make ('config ' )->set ('two-factor.issuer ' , 'foo bar ' );
336336
337337 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
338- 'label ' => 'test@foo.com ' ,
338+ 'label ' => 'test@foo.com ' ,
339339 'shared_secret ' => static ::SECRET ,
340- 'algorithm ' => 'sHa256 ' ,
341- 'digits ' => 14 ,
340+ 'algorithm ' => 'sHa256 ' ,
341+ 'digits ' => 14 ,
342342 ]);
343343
344344 $ uri = 'otpauth://totp/foo%20bar%3Atest@foo.com?issuer=foo%20bar&label=test%40foo.com&secret=KS72XBTN5PEBGX2IWBMVW44LXHPAQ7L3&algorithm=SHA256&digits=14 ' ;
@@ -352,10 +352,10 @@ public function test_throws_exception_when_issuer_is_empty(): void
352352 $ this ->app ->make ('config ' )->set ('two-factor.issuer ' , '' );
353353
354354 $ tfa = TwoFactorAuthentication::factory ()->withRecovery ()->withSafeDevices ()->make ([
355- 'label ' => 'test@foo.com ' ,
355+ 'label ' => 'test@foo.com ' ,
356356 'shared_secret ' => static ::SECRET ,
357- 'algorithm ' => 'sHa256 ' ,
358- 'digits ' => 14 ,
357+ 'algorithm ' => 'sHa256 ' ,
358+ 'digits ' => 14 ,
359359 ]);
360360
361361 $ this ->expectException (InvalidArgumentException::class);
0 commit comments