Ticket #29636: 29636.3.diff
File 29636.3.diff, 1015 bytes (added by , 7 years ago) |
---|
-
tests/phpunit/tests/general/paginateLinks.php
3 3 class Tests_Paginate_Links extends WP_UnitTestCase { 4 4 5 5 private $i18n_count = 0; 6 private $permalink_structure = ''; 6 7 7 8 function setUp() { 8 9 parent::setUp(); 10 global $wp_rewrite; 9 11 10 12 $this->go_to( home_url( '/' ) ); 13 14 $this->permalink_structure = $wp_rewrite->permalink_structure; 15 $wp_rewrite->set_permalink_structure( get_option('permalink_structure') ); 11 16 } 12 17 18 function tearDown() { 19 global $wp_rewrite; 20 $wp_rewrite->set_permalink_structure( $this->permalink_structure ); 21 } 22 13 23 function test_defaults() { 14 24 $page2 = get_pagenum_link( 2 ); 15 25 $page3 = get_pagenum_link( 3 ); … … 215 225 $href = $tag->attributes->getNamedItem( 'href' )->value; 216 226 $this->assertEquals( $expected_href, $href ); 217 227 } 228 218 229 } 219 230 }