diff --git a/tests/phpunit/tests/comment/query.php b/tests/phpunit/tests/comment/query.php
index 5d250ea..f344d1d 100644
a
|
b
|
class Tests_Comment_Query extends WP_UnitTestCase { |
1658 | 1658 | } |
1659 | 1659 | |
1660 | 1660 | /** |
1661 | | * @ticket 22400 |
| 1661 | * @ticket 35075 |
1662 | 1662 | */ |
1663 | | public function test_comment_cache_key_should_ignore_custom_params() { |
| 1663 | public function test_comment_cache_key_should_cache_custom_params() { |
1664 | 1664 | global $wpdb; |
1665 | 1665 | |
1666 | 1666 | $p = self::factory()->post->create(); |
1667 | 1667 | $c = self::factory()->comment->create( array( 'comment_post_ID' => $p ) ); |
1668 | 1668 | |
| 1669 | $start_num = $wpdb->num_queries; |
| 1670 | |
1669 | 1671 | $q1 = new WP_Comment_Query(); |
1670 | 1672 | $q1->query( array( |
1671 | 1673 | 'post_id' => $p, |
1672 | 1674 | 'fields' => 'ids', |
1673 | 1675 | ) ); |
1674 | 1676 | |
1675 | | $num_queries = $wpdb->num_queries; |
1676 | | |
1677 | 1677 | $q2 = new WP_Comment_Query(); |
1678 | 1678 | $q2->query( array( |
1679 | 1679 | 'post_id' => $p, |
… |
… |
class Tests_Comment_Query extends WP_UnitTestCase { |
1681 | 1681 | 'foo' => 'bar', |
1682 | 1682 | ) ); |
1683 | 1683 | |
1684 | | $this->assertSame( $num_queries, $wpdb->num_queries ); |
| 1684 | $this->assertSame( $start_num + 2, $wpdb->num_queries ); |
1685 | 1685 | } |
1686 | 1686 | |
1687 | 1687 | /** |