From 3aca4edffa87ed233d54507ebe7c6449ee5060f3 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 6 Oct 2015 16:01:38 +0000 Subject: [PATCH] Tests: Update `Tests_Rewrite_AddRewriteRule->setUp()` to use the new `set_permalink_structure()` helper. See #33968. git-svn-id: https://develop.svn.wordpress.org/trunk@34870 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/rewrite/addRewriteRule.php | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/tests/phpunit/tests/rewrite/addRewriteRule.php b/tests/phpunit/tests/rewrite/addRewriteRule.php index 2296e88722..08a020448b 100644 --- a/tests/phpunit/tests/rewrite/addRewriteRule.php +++ b/tests/phpunit/tests/rewrite/addRewriteRule.php @@ -6,19 +6,9 @@ class Tests_Rewrite_AddRewriteRule extends WP_UnitTestCase { public function setUp() { - global $wp_rewrite; parent::setUp(); - $wp_rewrite->init(); - $wp_rewrite->set_permalink_structure( '/%postname%/' ); - $wp_rewrite->flush_rules(); - } - - public function tearDown() { - global $wp_rewrite; - $wp_rewrite->init(); - - parent::tearDown(); + $this->set_permalink_structure( '/%postname%/' ); } /**