Changeset 34810 for trunk/tests/phpunit/tests/post.php
- Timestamp:
- 10/03/2015 08:54:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/post.php
r34802 r34810 416 416 */ 417 417 public function test_wp_insert_post_should_not_allow_a_bare_numeric_slug_that_might_conflict_with_a_date_archive_when_generating_from_an_empty_post_title() { 418 global $wp_rewrite; 419 $wp_rewrite->init(); 420 $wp_rewrite->set_permalink_structure( '/%postname%/' ); 421 $wp_rewrite->flush_rules(); 418 $this->set_permalink_structure( '/%postname%/' ); 422 419 423 420 $p = wp_insert_post( array( … … 430 427 $post = get_post( $p ); 431 428 432 $this-> reset_permalinks();429 $this->set_permalink_structure(); 433 430 434 431 $this->assertEquals( "$p-2", $post->post_name ); … … 506 503 // might only fail if the post ID is greater than four characters 507 504 508 global $wp_rewrite; 509 $wp_rewrite->init(); 510 $wp_rewrite->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/'); 511 $wp_rewrite->flush_rules(); 505 $this->set_permalink_structure('/%year%/%monthnum%/%day%/%postname%/'); 512 506 513 507 $post = array(
Note: See TracChangeset
for help on using the changeset viewer.