From c7a86be42cd8cd193ed33424a53f3996318e93f7 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Tue, 20 Oct 2015 17:04:29 +0000 Subject: [PATCH] Tests: Use updated filter names and oembed title for UT sanity. See [35294], #31078. git-svn-id: https://develop.svn.wordpress.org/trunk@35295 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/embed-template.php | 2 +- tests/phpunit/tests/general/document-title.php | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/wp-includes/embed-template.php b/src/wp-includes/embed-template.php index d7bda9fed4..b60ba56875 100644 --- a/src/wp-includes/embed-template.php +++ b/src/wp-includes/embed-template.php @@ -20,7 +20,7 @@ wp_enqueue_style( 'open-sans' ); > - <?php wp_title( '-', true, 'right' ); ?> + <?php echo wp_get_document_title(); ?> go_to( '/' ); - add_filter( 'title_tag_pre', array( $this, '_short_circuit_title' ) ); + add_filter( 'pre_get_document_title', array( $this, '_short_circuit_title' ) ); $this->expectOutputString( "A Wild Title\n" ); _wp_render_title_tag(); @@ -74,7 +74,7 @@ class Tests_Document_Title extends WP_UnitTestCase { function test_home_title() { $this->go_to( '/' ); - add_filter( 'title_tag_parts', array( $this, '_home_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, '_home_title_parts' ) ); $this->expectOutputString( "Test Blog – Just another WordPress site\n" ); _wp_render_title_tag(); @@ -91,7 +91,7 @@ class Tests_Document_Title extends WP_UnitTestCase { function test_paged_title() { $this->go_to( '?page=4' ); - add_filter( 'title_tag_parts', array( $this, '_paged_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, '_paged_title_parts' ) ); $this->expectOutputString( "Test Blog – Page 4 – Just another WordPress site\n" ); _wp_render_title_tag(); @@ -109,7 +109,7 @@ class Tests_Document_Title extends WP_UnitTestCase { function test_singular_title() { $this->go_to( '?p=' . $this->post_id ); - add_filter( 'title_tag_parts', array( $this, '_singular_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, '_singular_title_parts' ) ); $this->expectOutputString( "test_title – Test Blog\n" ); _wp_render_title_tag(); @@ -212,7 +212,7 @@ class Tests_Document_Title extends WP_UnitTestCase { function test_rearrange_title_parts() { $this->go_to( '?p=' . $this->post_id ); - add_filter( 'title_tag_parts', array( $this, '_rearrange_title_parts' ) ); + add_filter( 'document_title_parts', array( $this, '_rearrange_title_parts' ) ); $this->expectOutputString( "Test Blog – test_title\n" ); _wp_render_title_tag(); @@ -230,7 +230,7 @@ class Tests_Document_Title extends WP_UnitTestCase { function test_change_title_separator() { $this->go_to( '?p=' . $this->post_id ); - add_filter( 'title_tag_separator', array( $this, '_change_title_separator' ) ); + add_filter( 'document_title_separator', array( $this, '_change_title_separator' ) ); $this->expectOutputString( "test_title %% Test Blog\n" ); _wp_render_title_tag();