Make WordPress Core


Ignore:
Timestamp:
07/03/2014 01:42:57 AM (10 years ago)
Author:
wonderboymusic
Message:

Setup rewrite changes in tests in a predictable fashion. Don't mix method calls with wrapper function calls.

See #28706.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/query/conditionals.php

    r27187 r28966  
    2424
    2525        global $wp_rewrite;
    26         update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );
     26
     27        $wp_rewrite->init();
     28        $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' );
     29
    2730        create_initial_taxonomies();
    28         $GLOBALS['wp_rewrite']->init();
    29         flush_rewrite_rules();
     31
     32        $wp_rewrite->flush_rules();
    3033    }
    3134
    3235    function tearDown() {
     36        global $wp_rewrite;
    3337        parent::tearDown();
    34         $GLOBALS['wp_rewrite']->init();
     38        $wp_rewrite->init();
    3539    }
    3640
Note: See TracChangeset for help on using the changeset viewer.