Make WordPress Core

Changeset 28964


Ignore:
Timestamp:
07/03/2014 12:49:32 AM (10 years ago)
Author:
wonderboymusic
Message:

Make sure hundreds of canonical tests don't fail in multisite every other time they are run.

See #28706.

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

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

    r26091 r28964  
    2020
    2121    function setUp() {
     22        global $wp_rewrite;
     23
    2224        parent::setUp();
    2325
     
    2628        update_option( 'posts_per_page', 5 );
    2729
    28         update_option( 'permalink_structure', $this->structure );
     30        $wp_rewrite->init();
     31        $wp_rewrite->set_permalink_structure( $this->structure );
     32
    2933        create_initial_taxonomies();
    30         $GLOBALS['wp_rewrite']->init();
    31         flush_rewrite_rules();
     34
     35        $wp_rewrite->flush_rules();
    3236
    3337        $this->old_current_user = get_current_user_id();
  • trunk/tests/phpunit/tests/link.php

    r28961 r28964  
    3535        $post_id2 = $this->factory->post->create();
    3636
    37         $wp_rewrite->permalink_structure = '';
     37        $wp_rewrite->init();
    3838        $wp_rewrite->set_permalink_structure( '' );
     39        $wp_rewrite->flush_rules();
    3940
    4041        // Basic case
Note: See TracChangeset for help on using the changeset viewer.