Make WordPress Core

Changeset 36238


Ignore:
Timestamp:
01/09/2016 08:08:47 AM (9 years ago)
Author:
dd32
Message:

Tests: Add more paged canonical tests for page_on_front.

See #35344.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/pageOnFront.php

    r35242 r36238  
    2020        update_option( 'show_on_front', 'page' );
    2121        update_option( 'page_for_posts', self::factory()->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) );
    22         update_option( 'page_on_front', self::factory()->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) );
     22        update_option( 'page_on_front', self::factory()->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page', 'post_content' => "Page 1\n<!--nextpage-->\nPage 2" ) ) );
    2323    }
    2424
     
    4040         */
    4141         return array(
    42              // Check against an odd redirect
    43              array( '/page/2/', '/page/2/', 20385 ),
    44              // The page designated as the front page should redirect to the front of the site
    45              array( '/front-page/', '/' ),
    46              array( '/blog-page/?paged=2', '/blog-page/page/2/' ),
     42            // Check against an odd redirect
     43            array( '/page/2/', '/page/2/' ),
     44            array( '/?page=2', '/page/2/' ),
     45            array( '/page/1/', '/' ),
     46            array( '/?page=1', '/' ),
     47
     48            // The page designated as the front page should redirect to the front of the site
     49            array( '/front-page/', '/' ),
     50            array( '/front-page/2/', '/page/2/' ),
     51            array( '/front-page/?page=2', '/page/2/' ),
     52            array( '/blog-page/?paged=2', '/blog-page/page/2/' ),
    4753         );
    4854    }
Note: See TracChangeset for help on using the changeset viewer.