Changeset 48939 for trunk/tests/phpunit/tests/post/getPages.php
- Timestamp:
- 09/04/2020 07:01:00 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/getPages.php
r48937 r48939 125 125 126 126 $cached_ids = wp_list_pluck( $cached, 'ID' ); 127 $this->assert EqualSets( array( $posts[0] ), $cached_ids );127 $this->assertSameSets( array( $posts[0] ), $cached_ids ); 128 128 129 129 add_post_meta( $posts[1], 'foo', 'bar' ); … … 137 137 138 138 $found_ids = wp_list_pluck( $found, 'ID' ); 139 $this->assert EqualSets( $posts, $found_ids );139 $this->assertSameSets( $posts, $found_ids ); 140 140 } 141 141 … … 162 162 163 163 $cached_ids = wp_list_pluck( $cached, 'ID' ); 164 $this->assert EqualSets( $posts, $cached_ids );164 $this->assertSameSets( $posts, $cached_ids ); 165 165 166 166 update_post_meta( $posts[1], 'foo', 'baz' ); … … 174 174 175 175 $found_ids = wp_list_pluck( $found, 'ID' ); 176 $this->assert EqualSets( array( $posts[0] ), $found_ids );176 $this->assertSameSets( array( $posts[0] ), $found_ids ); 177 177 } 178 178 … … 199 199 200 200 $cached_ids = wp_list_pluck( $cached, 'ID' ); 201 $this->assert EqualSets( $posts, $cached_ids );201 $this->assertSameSets( $posts, $cached_ids ); 202 202 203 203 delete_post_meta( $posts[1], 'foo' ); … … 211 211 212 212 $found_ids = wp_list_pluck( $found, 'ID' ); 213 $this->assert EqualSets( array( $posts[0] ), $found_ids );213 $this->assertSameSets( array( $posts[0] ), $found_ids ); 214 214 } 215 215 … … 236 236 237 237 $cached_ids = wp_list_pluck( $cached, 'ID' ); 238 $this->assert EqualSets( $posts, $cached_ids );238 $this->assertSameSets( $posts, $cached_ids ); 239 239 240 240 delete_post_meta_by_key( 'foo' ); … … 248 248 249 249 $found_ids = wp_list_pluck( $found, 'ID' ); 250 $this->assert EqualSets( array(), $found_ids );250 $this->assertSameSets( array(), $found_ids ); 251 251 } 252 252 … … 341 341 ) 342 342 ); 343 $this->assert EqualSets( array( $page_id1 ), wp_list_pluck( $pages, 'ID' ) );343 $this->assertSameSets( array( $page_id1 ), wp_list_pluck( $pages, 'ID' ) ); 344 344 345 345 $pages = get_pages( … … 349 349 ) 350 350 ); 351 $this->assert EqualSets( array( $page_id2, $page_id4 ), wp_list_pluck( $pages, 'ID' ) );351 $this->assertSameSets( array( $page_id2, $page_id4 ), wp_list_pluck( $pages, 'ID' ) ); 352 352 353 353 $pages = get_pages( … … 357 357 ) 358 358 ); 359 $this->assert EqualSets( array( $page_id2, $page_id3, $page_id4 ), wp_list_pluck( $pages, 'ID' ) );359 $this->assertSameSets( array( $page_id2, $page_id3, $page_id4 ), wp_list_pluck( $pages, 'ID' ) ); 360 360 361 361 $pages = get_pages( array( 'parent' => 0 ) ); 362 $this->assert EqualSets( array( $page_id1 ), wp_list_pluck( $pages, 'ID' ) );362 $this->assertSameSets( array( $page_id1 ), wp_list_pluck( $pages, 'ID' ) ); 363 363 364 364 $pages = get_pages( array( 'parent' => $page_id1 ) ); 365 $this->assert EqualSets( array( $page_id2, $page_id4 ), wp_list_pluck( $pages, 'ID' ) );365 $this->assertSameSets( array( $page_id2, $page_id4 ), wp_list_pluck( $pages, 'ID' ) ); 366 366 367 367 $pages = get_pages( array( 'parent' => array( $page_id1, $page_id2 ) ) ); 368 $this->assert EqualSets( array( $page_id2, $page_id3, $page_id4 ), wp_list_pluck( $pages, 'ID' ) );368 $this->assertSameSets( array( $page_id2, $page_id3, $page_id4 ), wp_list_pluck( $pages, 'ID' ) ); 369 369 } 370 370 … … 393 393 ) 394 394 ); 395 $this->assert EqualSets( $child_ids, $post_ids );395 $this->assertSameSets( $child_ids, $post_ids ); 396 396 } 397 397 … … 443 443 */ 444 444 445 $this->assert EqualSets( array( $page_1, $page_2, $page_4, $page_3 ), wp_list_pluck( $pages, 'ID' ) );445 $this->assertSameSets( array( $page_1, $page_2, $page_4, $page_3 ), wp_list_pluck( $pages, 'ID' ) ); 446 446 } 447 447 … … 489 489 $found_pages = wp_list_filter( $pages, array( 'post_parent' => 0 ) ); 490 490 491 $this->assert EqualSets( array( $page_1, $page_2 ), wp_list_pluck( $found_pages, 'ID' ) );491 $this->assertSameSets( array( $page_1, $page_2 ), wp_list_pluck( $found_pages, 'ID' ) ); 492 492 } 493 493 … … 525 525 */ 526 526 527 $this->assert EqualSets( array( $page_1, $page_2, $page_3, $page_4 ), wp_list_pluck( $pages, 'ID' ) );527 $this->assertSameSets( array( $page_1, $page_2, $page_3, $page_4 ), wp_list_pluck( $pages, 'ID' ) ); 528 528 } 529 529 … … 568 568 */ 569 569 570 $this->assert EqualSets( array( $page_3, $page_4, $page_5 ), wp_list_pluck( $pages, 'ID' ) );570 $this->assertSameSets( array( $page_3, $page_4, $page_5 ), wp_list_pluck( $pages, 'ID' ) ); 571 571 } 572 572 … … 615 615 * hierarchically anyway in order of creation: 3, 4, 5. 616 616 */ 617 $this->assert EqualSets( array( $page_3, $page_4, $page_5 ), wp_list_pluck( $pages, 'ID' ) );617 $this->assertSameSets( array( $page_3, $page_4, $page_5 ), wp_list_pluck( $pages, 'ID' ) ); 618 618 619 619 // How it should work. 620 620 $found_pages = wp_list_filter( $pages, array( 'post_parent' => $page_1 ) ); 621 $this->assert EqualSets( array( $page_3, $page_5 ), wp_list_pluck( $found_pages, 'ID' ) );621 $this->assertSameSets( array( $page_3, $page_5 ), wp_list_pluck( $found_pages, 'ID' ) ); 622 622 623 623 }
Note: See TracChangeset
for help on using the changeset viewer.