You appear to be a bot. Output may be restricted
Description
Usage
Tests_Admin_Includes_Post::test_get_sample_permalink_html_should_use_preview_links_for_draft_and_pending_posts_with_no_post_name();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/admin/includesPost.php
Lines:
1 to 19 of 19
public function test_get_sample_permalink_html_should_use_preview_links_for_draft_and_pending_posts_with_no_post_name() { $this->set_permalink_structure( '/%postname%/' ); wp_set_current_user( self::$admin_id ); $future_date = gmdate( 'Y-m-d H:i:s', time() + 100 ); $p = self::factory()->post->create( array( 'post_status' => 'pending', 'post_name' => '', 'post_date' => $future_date, ) ); $found = get_sample_permalink_html( $p ); $post = get_post( $p ); $this->assertContains( 'href="' . esc_url( get_preview_post_link( $post ) ), $found ); }