Changeset 48937 for trunk/tests/phpunit/tests/query/metaQuery.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/query/metaQuery.php
r47122 r48937 420 420 421 421 $expected = array( $p1 ); 422 $this->assert Equals( $expected, $query->posts );422 $this->assertSame( $expected, $query->posts ); 423 423 } 424 424 … … 673 673 674 674 $expected = array( $post_id4 ); 675 $this->assert Equals( $expected, $query->posts );675 $this->assertSame( $expected, $query->posts ); 676 676 677 677 $query = new WP_Query( … … 697 697 ); 698 698 699 $this->assert Equals( 0, count( $query->posts ) );699 $this->assertSame( 0, count( $query->posts ) ); 700 700 } 701 701 … … 1374 1374 ); 1375 1375 1376 $this->assert Equals( array( $posts[2], $posts[0], $posts[1] ), $query->posts );1376 $this->assertSame( array( $posts[2], $posts[0], $posts[1] ), $query->posts ); 1377 1377 } 1378 1378 … … 1419 1419 ); 1420 1420 1421 $this->assert Equals( array( $posts[2], $posts[0], $posts[1] ), $query->posts );1421 $this->assertSame( array( $posts[2], $posts[0], $posts[1] ), $query->posts ); 1422 1422 } 1423 1423 … … 1535 1535 1536 1536 $query = new WP_Query( $args ); 1537 $this->assert Equals( 2, count( $query->posts ) );1537 $this->assertSame( 2, count( $query->posts ) ); 1538 1538 foreach ( $query->posts as $post ) { 1539 1539 $this->assertInstanceOf( 'WP_Post', $post ); 1540 $this->assert Equals( 'raw', $post->filter );1540 $this->assertSame( 'raw', $post->filter ); 1541 1541 } 1542 1542 $posts = wp_list_pluck( $query->posts, 'ID' ); … … 1551 1551 1552 1552 $query = new WP_Query( $args ); 1553 $this->assert Equals( 3, count( $query->posts ) );1553 $this->assertSame( 3, count( $query->posts ) ); 1554 1554 foreach ( $query->posts as $post ) { 1555 1555 $this->assertInstanceOf( 'WP_Post', $post ); 1556 $this->assert Equals( 'raw', $post->filter );1556 $this->assertSame( 'raw', $post->filter ); 1557 1557 } 1558 1558 $posts = wp_list_pluck( $query->posts, 'ID' ); … … 1583 1583 ); 1584 1584 1585 $this->assert Equals( 2, count( $posts ) );1585 $this->assertSame( 2, count( $posts ) ); 1586 1586 $posts = wp_list_pluck( $posts, 'ID' ); 1587 1587 $this->assertEqualSets( array( $post_id, $post_id3 ), $posts ); … … 1595 1595 ); 1596 1596 1597 $this->assert Equals( 2, count( $posts ) );1597 $this->assertSame( 2, count( $posts ) ); 1598 1598 foreach ( $posts as $post ) { 1599 1599 $this->assertInstanceOf( 'WP_Post', $post ); 1600 $this->assert Equals( 'raw', $post->filter );1600 $this->assertSame( 'raw', $post->filter ); 1601 1601 } 1602 1602 $posts = wp_list_pluck( $posts, 'ID' ); … … 1626 1626 1627 1627 $posts = get_posts( $args ); 1628 $this->assert Equals( 2, count( $posts ) );1628 $this->assertSame( 2, count( $posts ) ); 1629 1629 foreach ( $posts as $post ) { 1630 1630 $this->assertInstanceOf( 'WP_Post', $post ); 1631 $this->assert Equals( 'raw', $post->filter );1631 $this->assertSame( 'raw', $post->filter ); 1632 1632 } 1633 1633 $posts = wp_list_pluck( $posts, 'ID' ); … … 1660 1660 ) 1661 1661 ); 1662 $this->assert Equals( 1, count( $q->posts ) );1662 $this->assertSame( 1, count( $q->posts ) ); 1663 1663 foreach ( $q->posts as $post ) { 1664 1664 $this->assertInstanceOf( 'WP_Post', $post ); 1665 $this->assert Equals( 'raw', $post->filter );1665 $this->assertSame( 'raw', $post->filter ); 1666 1666 } 1667 $this->assert Equals( $post_id, $q->posts[0]->ID );1667 $this->assertSame( $post_id, $q->posts[0]->ID ); 1668 1668 1669 1669 $posts = get_posts( … … 1673 1673 ) 1674 1674 ); 1675 $this->assert Equals( 2, count( $posts ) );1675 $this->assertSame( 2, count( $posts ) ); 1676 1676 foreach ( $posts as $post ) { 1677 1677 $this->assertInstanceOf( 'WP_Post', $post ); 1678 $this->assert Equals( 'raw', $post->filter );1678 $this->assertSame( 'raw', $post->filter ); 1679 1679 } 1680 1680 $posts = wp_list_pluck( $posts, 'ID' ); … … 1687 1687 ) 1688 1688 ); 1689 $this->assert Equals( 2, count( $posts ) );1689 $this->assertSame( 2, count( $posts ) ); 1690 1690 foreach ( $posts as $post ) { 1691 1691 $this->assertInstanceOf( 'WP_Post', $post ); 1692 $this->assert Equals( 'raw', $post->filter );1692 $this->assertSame( 'raw', $post->filter ); 1693 1693 } 1694 1694 $posts = wp_list_pluck( $posts, 'ID' ); … … 1696 1696 1697 1697 $posts = get_posts( array( 'meta_value' => 0 ) ); 1698 $this->assert Equals( 5, count( $posts ) );1698 $this->assertSame( 5, count( $posts ) ); 1699 1699 foreach ( $posts as $post ) { 1700 1700 $this->assertInstanceOf( 'WP_Post', $post ); 1701 $this->assert Equals( 'raw', $post->filter );1701 $this->assertSame( 'raw', $post->filter ); 1702 1702 } 1703 1703 $posts = wp_list_pluck( $posts, 'ID' ); … … 1705 1705 1706 1706 $posts = get_posts( array( 'meta_value' => '0' ) ); 1707 $this->assert Equals( 5, count( $posts ) );1707 $this->assertSame( 5, count( $posts ) ); 1708 1708 foreach ( $posts as $post ) { 1709 1709 $this->assertInstanceOf( 'WP_Post', $post ); 1710 $this->assert Equals( 'raw', $post->filter );1710 $this->assertSame( 'raw', $post->filter ); 1711 1711 } 1712 1712 $posts = wp_list_pluck( $posts, 'ID' ); … … 1737 1737 ); 1738 1738 1739 $this->assert Equals( array( $posts[1], $posts[2], $posts[0] ), $q->posts );1739 $this->assertSame( array( $posts[1], $posts[2], $posts[0] ), $q->posts ); 1740 1740 } 1741 1741 … … 1780 1780 ); 1781 1781 1782 $this->assert Equals( array( $p3, $p1, $p2 ), $q->posts );1782 $this->assertSame( array( $p3, $p1, $p2 ), $q->posts ); 1783 1783 } 1784 1784 … … 1816 1816 ); 1817 1817 1818 $this->assert Equals( array( $posts[2], $posts[0], $posts[1] ), $q->posts );1818 $this->assertSame( array( $posts[2], $posts[0], $posts[1] ), $q->posts ); 1819 1819 } 1820 1820
Note: See TracChangeset
for help on using the changeset viewer.