Changeset 38769 for trunk/tests/phpunit/tests/user/capabilities.php
- Timestamp:
- 10/10/2016 02:39:35 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/capabilities.php
r38732 r38769 458 458 } 459 459 460 $this->assertFalse( $user->has_cap( 'start_a_fire' ), "User with the {$role} role should not have a custom capability" ); 461 $this->assertFalse( user_can( $user, 'start_a_fire' ), "User with the {$role} role should not have a custom capability" ); 462 460 463 $this->assertFalse( $user->has_cap( 'do_not_allow' ), "User with the {$role} role should not have the do_not_allow capability" ); 461 464 $this->assertFalse( user_can( $user, 'do_not_allow' ), "User with the {$role} role should not have the do_not_allow capability" ); 462 463 465 } 464 466 … … 527 529 $this->assertTrue( user_can( $user, $cap ), "Super Admins should have the {$cap} capability" ); 528 530 } 531 532 $this->assertTrue( $user->has_cap( 'start_a_fire' ), "Super admins should have all custom capabilities" ); 533 $this->assertTrue( user_can( $user, 'start_a_fire' ), "Super admins should have all custom capabilities" ); 529 534 530 535 $this->assertFalse( $user->has_cap( 'do_not_allow' ), 'Super Admins should not have the do_not_allow capability' ); … … 1480 1485 } 1481 1486 1487 $this->assertFalse( current_user_can( 'start_a_fire' ), "Non-logged-in user should not have a custom capability" ); 1482 1488 $this->assertFalse( current_user_can( 'do_not_allow' ), "Non-logged-in user should not have the do_not_allow capability" ); 1483 1489 }
Note: See TracChangeset
for help on using the changeset viewer.