|
@@ 360-365 (lines=6) @@
|
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
// 'search/(.+)/page/?([0-9]{1,})/?$' => 'index.php?s=$matches[1]&paged=$matches[2]', |
| 360 |
|
function test_search_paged() |
| 361 |
|
{ |
| 362 |
|
update_option('posts_per_page', 2); |
| 363 |
|
self::factory()->post->create_many(3, array( 'post_title' => 'test' )); |
| 364 |
|
$this->go_to('/search/test/page/2/'); |
| 365 |
|
$this->assertQueryTrue('is_search', 'is_paged'); |
| 366 |
|
} |
| 367 |
|
|
| 368 |
|
// 'search/(.+)/?$' => 'index.php?s=$matches[1]', |
|
@@ 406-411 (lines=6) @@
|
| 403 |
|
} |
| 404 |
|
|
| 405 |
|
// 'category/(.+?)/page/?([0-9]{1,})/?$' => 'index.php?category_name=$matches[1]&paged=$matches[2]', |
| 406 |
|
function test_category_paged() |
| 407 |
|
{ |
| 408 |
|
update_option('posts_per_page', 2); |
| 409 |
|
self::factory()->post->create_many(3); |
| 410 |
|
$this->go_to('/category/uncategorized/page/2/'); |
| 411 |
|
$this->assertQueryTrue('is_archive', 'is_category', 'is_paged'); |
| 412 |
|
} |
| 413 |
|
|
| 414 |
|
// 'category/(.+?)/?$' => 'index.php?category_name=$matches[1]', |
|
@@ 540-545 (lines=6) @@
|
| 537 |
|
} |
| 538 |
|
|
| 539 |
|
// '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&paged=$matches[4]', |
| 540 |
|
function test_ymd_paged() |
| 541 |
|
{ |
| 542 |
|
update_option('posts_per_page', 2); |
| 543 |
|
self::factory()->post->create_many(3, array( 'post_date' => '2007-09-04 00:00:00' )); |
| 544 |
|
$this->go_to('/2007/09/04/page/2/'); |
| 545 |
|
$this->assertQueryTrue('is_archive', 'is_day', 'is_date', 'is_paged'); |
| 546 |
|
} |
| 547 |
|
|
| 548 |
|
// '([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]', |
|
@@ 577-582 (lines=6) @@
|
| 574 |
|
} |
| 575 |
|
|
| 576 |
|
// '([0-9]{4})/([0-9]{1,2})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]&paged=$matches[3]', |
| 577 |
|
function test_ym_paged() |
| 578 |
|
{ |
| 579 |
|
update_option('posts_per_page', 2); |
| 580 |
|
self::factory()->post->create_many(3, array( 'post_date' => '2007-09-04 00:00:00' )); |
| 581 |
|
$this->go_to('/2007/09/page/2/'); |
| 582 |
|
$this->assertQueryTrue('is_archive', 'is_date', 'is_month', 'is_paged'); |
| 583 |
|
} |
| 584 |
|
|
| 585 |
|
// '([0-9]{4})/([0-9]{1,2})/?$' => 'index.php?year=$matches[1]&monthnum=$matches[2]', |
|
@@ 614-619 (lines=6) @@
|
| 611 |
|
} |
| 612 |
|
|
| 613 |
|
// '([0-9]{4})/page/?([0-9]{1,})/?$' => 'index.php?year=$matches[1]&paged=$matches[2]', |
| 614 |
|
function test_y_paged() |
| 615 |
|
{ |
| 616 |
|
update_option('posts_per_page', 2); |
| 617 |
|
self::factory()->post->create_many(3, array( 'post_date' => '2007-09-04 00:00:00' )); |
| 618 |
|
$this->go_to('/2007/page/2/'); |
| 619 |
|
$this->assertQueryTrue('is_archive', 'is_date', 'is_year', 'is_paged'); |
| 620 |
|
} |
| 621 |
|
|
| 622 |
|
// '([0-9]{4})/?$' => 'index.php?year=$matches[1]', |