Make WordPress Core


Ignore:
Timestamp:
10/03/2015 05:14:12 PM (8 years ago)
Author:
DrewAPicture
Message:

Tests: Introduce WP_UnitTestCase::reset_permalinks(), an attempt to DRY up logic for resetting and restoring default permalinks on setUp() and tearDown().

See #33968.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post.php

    r34762 r34802  
    430430        $post = get_post( $p );
    431431
    432         $wp_rewrite->set_permalink_structure( '' );
     432        $this->reset_permalinks();
    433433
    434434        $this->assertEquals( "$p-2", $post->post_name );
     
    526526        // permalink should include the post ID at the end
    527527        $this->assertEquals(get_option('siteurl').'/2007/10/31/'.$id.'/', $plink);
    528 
    529         $wp_rewrite->set_permalink_structure('');
    530528    }
    531529
Note: See TracChangeset for help on using the changeset viewer.