Changeset 51397 for trunk/tests/phpunit/tests/user/capabilities.php
- Timestamp:
- 07/10/2021 11:15:44 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/capabilities.php
r50491 r51397 1609 1609 1610 1610 $author->add_cap( 'foo', false ); 1611 $this->assert True( isset( $author->caps['foo'] ));1611 $this->assertArrayHasKey( 'foo', $author->caps ); 1612 1612 $this->assertFalse( user_can( $author->ID, 'foo' ) ); 1613 1613 1614 1614 $author->remove_cap( 'foo' ); 1615 $this->assert False( isset( $author->caps['foo'] ));1615 $this->assertArrayNotHasKey( 'foo', $author->caps ); 1616 1616 $this->assertFalse( user_can( $author->ID, 'foo' ) ); 1617 1617 } … … 2238 2238 $wp_roles->for_site( $site_id ); 2239 2239 2240 $this->assert True( isset( $wp_roles->role_objects[ $role_name ] ));2240 $this->assertArrayHasKey( $role_name, $wp_roles->role_objects ); 2241 2241 } 2242 2242
Note: See TracChangeset
for help on using the changeset viewer.