Changeset 31323 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 02/02/2015 04:49:23 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r28113 r31323 179 179 } 180 180 181 /** 182 * @ticket 30910 183 */ 184 public function test_get_sample_permalink_should_return_pretty_permalink_for_posts_with_post_status_future() { 185 global $wp_rewrite; 186 187 $old_permalink_structure = get_option( 'permalink_structure' ); 188 $permalink_structure = '%postname%'; 189 $wp_rewrite->set_permalink_structure( "/$permalink_structure/" ); 190 flush_rewrite_rules(); 191 192 $future_date = date( 'Y-m-d H:i:s', time() + 100 ); 193 $p = $this->factory->post->create( array( 'post_status' => 'future', 'post_name' => 'foo', 'post_date' => $future_date ) ); 194 195 $found = get_sample_permalink( $p ); 196 $expected = trailingslashit( home_url( $permalink_structure ) ); 197 198 $this->assertSame( $expected, $found[0] ); 199 200 $wp_rewrite->set_permalink_structure( $old_permalink_structure ); 201 flush_rewrite_rules(); 202 } 181 203 }
Note: See TracChangeset
for help on using the changeset viewer.