Changeset 35191 for trunk/tests/phpunit/tests/canonical/pageOnFront.php
- Timestamp:
- 10/15/2015 05:50:40 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/canonical/pageOnFront.php
r31622 r35191 7 7 */ 8 8 class Tests_Canonical_PageOnFront extends WP_Canonical_UnitTestCase { 9 public static function setUpBeforeClass() {10 self::generate_shared_fixtures( );9 public static function wpSetUpBeforeClass( $factory ) { 10 self::generate_shared_fixtures( $factory ); 11 11 } 12 12 13 public static function tearDownAfterClass() {13 public static function wpTearDownAfterClass() { 14 14 self::delete_shared_fixtures(); 15 15 } … … 17 17 function setUp() { 18 18 parent::setUp(); 19 global $wp_rewrite; 19 20 20 update_option( 'show_on_front', 'page' ); 21 21 update_option( 'page_for_posts', $this->factory->post->create( array( 'post_title' => 'blog-page', 'post_type' => 'page' ) ) ); 22 22 update_option( 'page_on_front', $this->factory->post->create( array( 'post_title' => 'front-page', 'post_type' => 'page' ) ) ); 23 $wp_rewrite->init();24 $wp_rewrite->flush_rules();25 }26 27 function tearDown() {28 global $wp_rewrite;29 $wp_rewrite->init();30 parent::tearDown();31 23 } 32 24
Note: See TracChangeset
for help on using the changeset viewer.