Skip to content

Commit 5331b73

Browse files
committed
Tests: Use strict comparisons for abilities pagination.
Use `assertNotSame()` to compare page-one and page-two identifier arrays in the abilities and ability categories REST controller tests. Developed in: #14728 Props shailu25. See #64895. git-svn-id: https://develop.svn.wordpress.org/trunk@64779 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a91de35 commit 5331b73

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

‎tests/phpunit/tests/rest-api/wpRestAbilitiesV1CategoriesController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ public function test_collection_params(): void {
360360
$page1_slugs = wp_list_pluck( $page1_response->get_data(), 'slug' );
361361
$page2_slugs = wp_list_pluck( $data, 'slug' );
362362

363-
$this->assertNotEquals( $page1_slugs, $page2_slugs );
363+
$this->assertNotSame( $page1_slugs, $page2_slugs );
364364
}
365365

366366
/**

‎tests/phpunit/tests/rest-api/wpRestAbilitiesV1ListController.php‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,7 @@ public function test_collection_params(): void {
600600
$page1_names = wp_list_pluck( $page1_response->get_data(), 'name' );
601601
$page2_names = wp_list_pluck( $data, 'name' );
602602

603-
$this->assertNotEquals( $page1_names, $page2_names );
603+
$this->assertNotSame( $page1_names, $page2_names );
604604
}
605605

606606
/**

0 commit comments

Comments
 (0)