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/verboseRewriteRules.php

    r25002 r28966  
    99class Tests_Query_VerbosePageRules extends Tests_Query_Conditionals {
    1010    function setUp() {
     11        global $wp_rewrite;
     12
    1113        parent::setUp();
    12         global $wp_rewrite;
    13         update_option( 'permalink_structure', '/%category%/%year%/%postname%/' );
     14       
     15        $wp_rewrite->init();
     16        $wp_rewrite->set_permalink_structure( '/%category%/%year%/%postname%/' );
     17
    1418        create_initial_taxonomies();
    15         $GLOBALS['wp_rewrite']->init();
    16         flush_rewrite_rules();
     19
     20        $wp_rewrite->flush_rules();
    1721    }
    1822}
Note: See TracChangeset for help on using the changeset viewer.