Make WordPress Core


Ignore:
Timestamp:
10/15/2015 05:50:40 AM (9 years ago)
Author:
wonderboymusic
Message:

Unit Tests: after [35186], "upgrade" the Canonical fixtures.

See #30017, #33968.

File:
1 edited

Legend:

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

    r31622 r35191  
    77 */
    88class Tests_Canonical_PageOnFront extends WP_Canonical_UnitTestCase {
    9     public static function setUpBeforeClass() {
    10         self::generate_shared_fixtures();
     9    public static function wpSetUpBeforeClass( $factory ) {
     10        self::generate_shared_fixtures( $factory );
    1111    }
    1212
    13     public static function tearDownAfterClass() {
     13    public static function wpTearDownAfterClass() {
    1414        self::delete_shared_fixtures();
    1515    }
     
    1717    function setUp() {
    1818        parent::setUp();
    19         global $wp_rewrite;
     19
    2020        update_option( 'show_on_front', 'page' );
    2121        update_option( 'page_for_posts', $this->factory->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) );
    2222        update_option( 'page_on_front', $this->factory->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) );
    23         $wp_rewrite->init();
    24         $wp_rewrite->flush_rules();
    25     }
    26 
    27     function tearDown() {
    28         global $wp_rewrite;
    29         $wp_rewrite->init();
    30         parent::tearDown();
    3123    }
    3224
Note: See TracChangeset for help on using the changeset viewer.