@@ -347,36 +347,35 @@ public function it_can_revoke_a_permission_from_a_user()
347
347
$ this ->assertFalse ($ this ->testUser ->hasPermissionTo ($ this ->testPermission ));
348
348
}
349
349
350
- /** @test */
351
- public function it_can_determine_that_the_user_has_any_of_the_permissions_directly () {
352
-
353
- $ this ->assertFalse ($ this ->testUser ->hasAnyPermission ('edit-articles ' ));
354
-
355
- $ this ->testUser ->givePermissionTo ('edit-articles ' );
356
-
357
- $ this ->refreshTestUser ();
350
+ /** @test */
351
+ public function it_can_determine_that_the_user_has_any_of_the_permissions_directly ()
352
+ {
353
+ $ this ->assertFalse ($ this ->testUser ->hasAnyPermission ('edit-articles ' ));
358
354
359
- $ this ->assertTrue ( $ this -> testUser ->hasAnyPermission ('edit-news ' , ' edit- articles ') );
355
+ $ this ->testUser ->givePermissionTo ('edit-articles ' );
360
356
361
- $ this ->testUser -> givePermissionTo ( ' edit-news ' );
357
+ $ this ->refreshTestUser ( );
362
358
363
- $ this ->refreshTestUser ( );
359
+ $ this ->assertTrue ( $ this -> testUser -> hasAnyPermission ( ' edit-news ' , ' edit-articles ' ) );
364
360
365
- $ this ->testUser ->revokePermissionTo ( $ this -> testPermission );
361
+ $ this ->testUser ->givePermissionTo ( ' edit-news ' );
366
362
367
- $ this ->assertTrue ( $ this -> testUser -> hasAnyPermission ( ' edit-articles ' , ' edit-news ' ) );
363
+ $ this ->refreshTestUser ( );
368
364
369
- }
365
+ $ this -> testUser -> revokePermissionTo ( $ this -> testPermission );
370
366
371
- /** @test */
372
- public function it_can_determine_that_the_user_has_any_of_the_permissions_via_role () {
367
+ $ this -> assertTrue ( $ this -> testUser -> hasAnyPermission ( ' edit-articles ' , ' edit-news ' ));
368
+ }
373
369
374
- $ this ->testRole ->givePermissionTo ('edit-articles ' );
370
+ /** @test */
371
+ public function it_can_determine_that_the_user_has_any_of_the_permissions_via_role ()
372
+ {
373
+ $ this ->testRole ->givePermissionTo ('edit-articles ' );
375
374
376
- $ this ->testUser ->assignRole ('testRole ' );
375
+ $ this ->testUser ->assignRole ('testRole ' );
377
376
378
- $ this ->assertTrue ($ this ->testUser ->hasAnyPermission ('edit-news ' , 'edit-articles ' ));
379
- }
377
+ $ this ->assertTrue ($ this ->testUser ->hasAnyPermission ('edit-news ' , 'edit-articles ' ));
378
+ }
380
379
381
380
/** @test */
382
381
public function it_can_determine_that_user_has_direct_permission ()
@@ -394,7 +393,6 @@ public function it_can_determine_that_user_has_direct_permission()
394
393
$ this ->assertFalse ($ this ->testUser ->hasDirectPermission ('edit-articles ' ));
395
394
}
396
395
397
-
398
396
/**
399
397
* @test
400
398
*
0 commit comments