mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown().
See #33968. git-svn-id: https://develop.svn.wordpress.org/trunk@34802 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -429,7 +429,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
|
||||
$post = get_post( $p );
|
||||
|
||||
$wp_rewrite->set_permalink_structure( '' );
|
||||
$this->reset_permalinks();
|
||||
|
||||
$this->assertEquals( "$p-2", $post->post_name );
|
||||
}
|
||||
@@ -525,8 +525,6 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
|
||||
// permalink should include the post ID at the end
|
||||
$this->assertEquals(get_option('siteurl').'/2007/10/31/'.$id.'/', $plink);
|
||||
|
||||
$wp_rewrite->set_permalink_structure('');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user