You appear to be a bot. Output may be restricted
Description
Usage
Tests_AdminBar::test_new_user_link_exists_for_user_with_create_users();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/adminbar.php
Lines:
1 to 15 of 15
public function test_new_user_link_exists_for_user_with_create_users() { wp_set_current_user( self::$admin_id ); add_filter( 'map_meta_cap', array( $this, 'map_meta_cap_grant_create_users' ), 10, 2 ); add_filter( 'map_meta_cap', array( $this, 'map_meta_cap_deny_promote_users' ), 10, 2 ); $this->assertTrue( current_user_can( 'create_users' ) ); $this->assertFalse( current_user_can( 'promote_users' ) ); $wp_admin_bar = $this->get_standard_admin_bar(); $node = $wp_admin_bar->get_node( 'new-user' ); // 'create_users' is sufficient in single- and multisite. $this->assertNotEmpty( $node ); }