Changeset 38001 for trunk/tests/phpunit/tests/comment/query.php
- Timestamp:
- 07/07/2016 02:26:21 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/query.php
r37954 r38001 2153 2153 2154 2154 /** 2155 * @ticket 37184 2156 */ 2157 public function test_found_rows_should_be_fetched_from_the_cache() { 2158 $comments = self::factory()->comment->create_many( 3, array( 'comment_post_ID' => self::$post_id ) ); 2159 2160 // Prime cache. 2161 new WP_Comment_Query( array( 2162 'post_id' => self::$post_id, 2163 'number' => 2, 2164 'no_found_rows' => false, 2165 ) ); 2166 2167 $q = new WP_Comment_Query( array( 2168 'post_id' => self::$post_id, 2169 'number' => 2, 2170 'no_found_rows' => false, 2171 ) ); 2172 2173 $this->assertEquals( 3, $q->found_comments ); 2174 $this->assertEquals( 2, $q->max_num_pages ); 2175 } 2176 2177 /** 2155 2178 * @ticket 8071 2156 2179 */
Note: See TracChangeset
for help on using the changeset viewer.