- Timestamp:
- 10/03/2015 08:54:11 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/link/getPostCommentsFeedLink.php
r34802 r34810 18 18 19 19 public function test_post_pretty_link() { 20 global $wp_rewrite; 21 $wp_rewrite->init(); 22 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 23 $wp_rewrite->flush_rules(); 20 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 24 21 25 22 $post_id = $this->factory->post->create(); … … 48 45 49 46 public function test_attachment_pretty_link() { 50 global $wp_rewrite; 51 $wp_rewrite->init(); 52 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 53 $wp_rewrite->flush_rules(); 47 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 54 48 55 49 $post_id = $this->factory->post->create( array( … … 71 65 72 66 public function test_attachment_no_name_pretty_link() { 73 global $wp_rewrite; 74 $wp_rewrite->init(); 75 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 76 $wp_rewrite->flush_rules(); 67 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 77 68 78 69 $post_id = $this->factory->post->create(); … … 104 95 105 96 public function test_unattached_pretty_link() { 106 global $wp_rewrite; 107 $wp_rewrite->init(); 108 $wp_rewrite->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 109 $wp_rewrite->flush_rules(); 97 $this->set_permalink_structure( '/%year%/%monthnum%/%day%/%postname%/' ); 110 98 111 99 $attachment_id = $this->factory->attachment->create_object( 'image.jpg', 0, array(
Note: See TracChangeset
for help on using the changeset viewer.