Changeset 34678 for trunk/tests/phpunit/tests/template/author.php
- Timestamp:
- 09/29/2015 02:18:55 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/template/author.php
r34677 r34678 7 7 */ 8 8 class Tests_Author_Template extends WP_UnitTestCase { 9 private $permalink_structure; 10 11 public function setUp() { 12 parent::setUp(); 13 14 global $wp_rewrite; 15 $this->permalink_structure = get_option( 'permalink_structure' ); 16 $wp_rewrite->set_permalink_structure( '' ); 17 $wp_rewrite->flush_rules(); 18 19 } 20 21 public function tearDown() { 22 global $wp_rewrite; 23 $wp_rewrite->set_permalink_structure( $this->permalink_structure ); 24 $wp_rewrite->flush_rules(); 25 26 parent::tearDown(); 27 } 9 28 10 29 /** … … 54 73 $this->assertContains( '>Foo</a>', $link ); 55 74 56 // Cleanup.57 $wp_rewrite->set_permalink_structure( '' );58 75 unset( $GLOBALS['authordata'] ); 59 76 }
Note: See TracChangeset
for help on using the changeset viewer.