You appear to be a bot. Output may be restricted
Description
Usage
Tests_AdminBar::test_admin_bar_contains_correct_links_for_users_with_no_role();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/adminbar.php
Lines:
1 to 21 of 21
public function test_admin_bar_contains_correct_links_for_users_with_no_role() { $this->assertFalse( user_can( self::$no_role_id, 'read' ) ); wp_set_current_user( self::$no_role_id ); $wp_admin_bar = $this->get_standard_admin_bar(); $node_site_name = $wp_admin_bar->get_node( 'site-name' ); $node_my_account = $wp_admin_bar->get_node( 'my-account' ); $node_user_info = $wp_admin_bar->get_node( 'user-info' ); $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' ); // Site menu points to the home page instead of the admin URL. $this->assertSame( home_url( '/' ), $node_site_name->href ); // No profile links as the user doesn't have any permissions on the site. $this->assertFalse( $node_my_account->href ); $this->assertFalse( $node_user_info->href ); $this->assertNull( $node_edit_profile ); }