Changeset 58174 for trunk/tests/phpunit/tests/admin/includesPost.php
- Timestamp:
- 05/20/2024 09:47:41 AM (2 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/admin/includesPost.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/admin/includesPost.php
r57580 r58174 931 931 get_sample_permalink( $post ); 932 932 $this->assertEquals( $post_original, $post, 'get_sample_permalink() modifies the post object.' ); 933 } 934 935 /** 936 * @ticket 59283 937 */ 938 public function test_get_sample_permalink_should_return_pretty_permalink_for_posts_with_post_status_auto_draft() { 939 $permalink_structure = '%postname%'; 940 $this->set_permalink_structure( "/$permalink_structure/" ); 941 942 $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); 943 $p = self::factory()->post->create( 944 array( 945 'post_status' => 'auto-draft', 946 'post_name' => 'foo', 947 'post_date' => $future_date, 948 ) 949 ); 950 951 $found = get_sample_permalink( $p ); 952 $expected = trailingslashit( home_url( $permalink_structure ) ); 953 954 $this->assertSame( $expected, $found[0] ); 933 955 } 934 956
Note: See TracChangeset
for help on using the changeset viewer.