Changeset 48937 for trunk/tests/phpunit/tests/post/query.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post/query.php
r48328 r48937 36 36 37 37 $this->assertNotEmpty( $posts ); 38 $this->assert Equals( array( $post_id ), wp_list_pluck( $posts, 'ID' ) );38 $this->assertSame( array( $post_id ), wp_list_pluck( $posts, 'ID' ) ); 39 39 40 40 $posts2 = $q->query( array( 'category__and' => array( $term_id, $term_id2 ) ) ); … … 97 97 98 98 // Fourth post added in filter. 99 $this->assert Equals( 4, count( $query->posts ) );100 $this->assert Equals( 4, $query->post_count );99 $this->assertSame( 4, count( $query->posts ) ); 100 $this->assertSame( 4, $query->post_count ); 101 101 102 102 foreach ( $query->posts as $post ) { … … 106 106 107 107 // Filters are raw. 108 $this->assert Equals( 'raw', $post->filter );108 $this->assertSame( 'raw', $post->filter ); 109 109 110 110 // Custom data added in the_posts filter is preserved. 111 $this->assert Equals( array( $post->ID, 'custom data' ), $post->custom_data );111 $this->assertSame( array( $post->ID, 'custom data' ), $post->custom_data ); 112 112 } 113 113 … … 614 614 ); 615 615 616 $this->assert Equals( 2, $q->found_posts );616 $this->assertSame( 2, $q->found_posts ); 617 617 $this->assertEquals( 2, $q->max_num_pages ); 618 618 } … … 637 637 ); 638 638 639 $this->assert Equals( 2, $q->found_posts );639 $this->assertSame( 2, $q->found_posts ); 640 640 $this->assertEquals( 2, $q->max_num_pages ); 641 641 } … … 663 663 remove_filter( 'split_the_query', '__return_true' ); 664 664 665 $this->assert Equals( 2, $q->found_posts );665 $this->assertSame( 2, $q->found_posts ); 666 666 $this->assertEquals( 2, $q->max_num_pages ); 667 667 } … … 690 690 remove_filter( 'split_the_query', '__return_false' ); 691 691 692 $this->assert Equals( 2, $q->found_posts );692 $this->assertSame( 2, $q->found_posts ); 693 693 $this->assertEquals( 2, $q->max_num_pages ); 694 694 } … … 723 723 $methd->invoke( $q, array( 'no_found_rows' => false ), array() ); 724 724 725 $this->assert Equals( $expected, $q->found_posts );725 $this->assertSame( $expected, $q->found_posts ); 726 726 } 727 727
Note: See TracChangeset
for help on using the changeset viewer.