function test_wp_embed_excerpt_more() { $post_id = self::factory()->post->create(array('post_title' => 'Foo Bar', 'post_content' => 'Bar Baz')); $this->assertEquals('', wp_embed_excerpt_more('')); $this->go_to(get_post_embed_url($post_id)); $actual = wp_embed_excerpt_more(''); $expected = sprintf(' … <a href="%s" class="wp-embed-more" target="_top">Continue reading <span class="screen-reader-text">Foo Bar</span></a>', get_the_permalink()); $this->assertEquals($expected, $actual); }
function test_wp_embed_excerpt_more() { $post_id = self::factory()->post->create(array('post_content' => 'Foo Bar')); $this->assertEquals('', wp_embed_excerpt_more('')); $this->go_to(get_post_embed_url($post_id)); $actual = wp_embed_excerpt_more(''); $expected = sprintf('… <a class="wp-embed-more" href="%s" target="_top">Read more</a>', get_the_permalink()); $this->assertEquals($expected, $actual); }