Changeset 47329 for branches/3.9/tests/phpunit/tests/query/taxQuery.php
- Timestamp:
- 02/20/2020 05:04:42 PM (5 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
-
branches/3.9/tests/phpunit/tests/query/taxQuery.php
r26875 r47329 23 23 24 24 function setUp() { 25 global $wp_rewrite; 25 26 parent::setUp(); 26 27 27 28 set_current_screen( 'front' ); 28 29 29 update_option( 'permalink_structure', '/%year%/%monthnum%/%day%/%postname%/' );30 31 30 $GLOBALS['wp_the_query'] = new WP_Query(); 32 31 $GLOBALS['wp_query'] = $GLOBALS['wp_the_query']; 32 33 $wp_rewrite->init(); 34 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 33 35 34 36 create_initial_taxonomies(); 35 37 register_taxonomy( 'testtax', 'post', array( 'public' => true ) ); 36 38 37 $GLOBALS['wp_rewrite']->init(); 38 flush_rewrite_rules(); 39 $wp_rewrite->flush_rules(); 39 40 40 41 $this->tag_id = $this->factory->tag->create( array( 'slug' => 'tag-slug' ) ); … … 57 58 58 59 function tearDown() { 60 global $wp_rewrite; 59 61 parent::tearDown(); 60 62 61 63 _unregister_taxonomy( 'testtax' ); 64 65 $wp_rewrite->init(); 62 66 63 67 remove_action( 'pre_get_posts', array( $this, 'pre_get_posts_tax_category_tax_query' ) );
Note: See TracChangeset
for help on using the changeset viewer.