Changeset 54077
- Timestamp:
- 09/06/2022 12:59:17 AM (3 years ago)
- Location:
- trunk/tests/phpunit/tests/rewrite
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rewrite/oldDateRedirect.php
r53549 r54077 107 107 108 108 $this->go_to( $old_permalink ); 109 109 110 wp_old_slug_redirect(); 110 111 $num_queries = get_num_queries(); 111 112 $this->assertSame( $permalink, $this->old_date_redirect_url ); 113 112 114 wp_old_slug_redirect(); 113 115 $this->assertSame( $permalink, $this->old_date_redirect_url ); … … 119 121 */ 120 122 public function test_old_date_redirect_cache_invalidation() { 121 global $wpdb;122 123 $old_permalink = user_trailingslashit( get_permalink( self::$post_id ) ); 123 124 … … 141 142 wp_update_post( 142 143 array( 143 'ID' => $this->post_id, 144 'post_date' => $time, 145 'post_date_gmt' => get_gmt_from_date( $time ), 146 'post_name' => 'bar-baz', 147 ) 148 ); 144 'ID' => self::$post_id, 145 'post_date' => $time, 146 'post_date_gmt' => get_gmt_from_date( $time ), 147 'post_name' => 'foo-bar-baz', 148 ) 149 ); 150 151 $permalink = user_trailingslashit( get_permalink( self::$post_id ) ); 149 152 150 153 $num_queries = get_num_queries(); 151 $this->go_to( $permalink );152 154 wp_old_slug_redirect(); 153 155 $this->assertSame( $permalink, $this->old_date_redirect_url ); -
trunk/tests/phpunit/tests/rewrite/oldSlugRedirect.php
r53549 r54077 74 74 $num_queries = get_num_queries(); 75 75 $this->assertSame( $permalink, $this->old_slug_redirect_url ); 76 76 77 wp_old_slug_redirect(); 77 78 $this->assertSame( $permalink, $this->old_slug_redirect_url ); … … 102 103 array( 103 104 'ID' => $this->post_id, 104 'post_name' => 'foo-bar', 105 ) 106 ); 105 'post_name' => 'foo-bar-baz', 106 ) 107 ); 108 109 $permalink = user_trailingslashit( get_permalink( $this->post_id ) ); 110 107 111 $num_queries = get_num_queries(); 108 112 wp_old_slug_redirect();
Note: See TracChangeset
for help on using the changeset viewer.