mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2025-10-16 12:05:38 +00:00
Props nerrad, wonderboymusic. See #30017, #33968. git-svn-id: https://develop.svn.wordpress.org/trunk@35242 602fd350-edb4-49c9-b593-d223f7449a82
25 lines
559 B
PHP
25 lines
559 B
PHP
<?php
|
|
/**
|
|
* @group canonical
|
|
* @group rewrite
|
|
* @group query
|
|
*/
|
|
class Tests_Canonical_Paged extends WP_Canonical_UnitTestCase {
|
|
|
|
function test_nextpage() {
|
|
$para = 'This is a paragraph.
|
|
This is a paragraph.
|
|
This is a paragraph.';
|
|
$next = '<!--nextpage-->';
|
|
|
|
$post_id = self::factory()->post->create( array(
|
|
'post_status' => 'publish',
|
|
'post_content' => "{$para}{$next}{$para}{$next}{$para}"
|
|
) );
|
|
|
|
$link = parse_url( get_permalink( $post_id ), PHP_URL_PATH );
|
|
$paged = $link . '4/';
|
|
|
|
$this->assertCanonical( $paged, $link );
|
|
}
|
|
} |