Changeset 34806 for trunk/tests/phpunit/tests/comment/getPageOfComment.php
- Timestamp:
- 10/03/2015 07:25:25 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/getPageOfComment.php
r34805 r34806 227 227 } 228 228 } 229 230 /** 231 * @ticket 13939 232 */ 233 public function test_comments_per_page_option_should_be_fallback_when_query_var_is_not_available() { 234 $now = time(); 235 236 $p = $this->factory->post->create(); 237 $c1 = $this->factory->comment->create( array( 'comment_post_ID' => $p, 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now ) ) ); 238 $c2 = $this->factory->comment->create( array( 'comment_post_ID' => $p, 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 20 ) ) ); 239 $c3 = $this->factory->comment->create( array( 'comment_post_ID' => $p, 'comment_date_gmt' => date( 'Y-m-d H:i:s', $now - 30 ) ) ); 240 241 update_option( 'comments_per_page', 2 ); 242 243 $this->assertEquals( 2, get_page_of_comment( $c1 ) ); 244 } 229 245 }
Note: See TracChangeset
for help on using the changeset viewer.