Skip to content

Commit b32d083

Browse files
committed
Tests: Use strict comparisons for admin bar profile URLs.
Use `assertNotSame()` for profile URL comparisons in multisite admin bar tests. Preserve the checks that users without a role on the current site receive links to the appropriate profile screen. Developed in: #14853 Props shailu25. See #64895. git-svn-id: https://develop.svn.wordpress.org/trunk@64781 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 2e47480 commit b32d083

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/phpunit/tests/adminbar.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
176176
$primary_profile_url = get_admin_url( $primary->blog_id, 'profile.php' );
177177

178178
// Ensure the user's primary blog is not the same as the main site.
179-
$this->assertNotEquals( $primary_profile_url, admin_url( 'profile.php' ) );
179+
$this->assertNotSame( $primary_profile_url, admin_url( 'profile.php' ) );
180180

181181
// Profile URLs should go to the user's primary blog.
182182
$this->assertSame( $primary_profile_url, $node_my_account->href );
@@ -229,7 +229,7 @@ public function test_admin_bar_contains_correct_links_for_users_with_no_role_on_
229229

230230
$user_profile_url = user_admin_url( 'profile.php' );
231231

232-
$this->assertNotEquals( $user_profile_url, admin_url( 'profile.php' ) );
232+
$this->assertNotSame( $user_profile_url, admin_url( 'profile.php' ) );
233233

234234
// Profile URLs should go to the user's primary blog.
235235
$this->assertSame( $user_profile_url, $node_my_account->href );

0 commit comments

Comments
 (0)