From 138b55c16ea7cc5882288ebb49df23d3d0ee4a40 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Wed, 24 Feb 2016 21:20:41 +0000 Subject: [PATCH] Embeds: Update embed template paths and messages in tests, missed in [36693]. Props ocean90 See #34561. git-svn-id: https://develop.svn.wordpress.org/trunk@36694 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/oembed/template.php | 32 ++++++++++++------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/phpunit/tests/oembed/template.php b/tests/phpunit/tests/oembed/template.php index 9121670185..21fd4851e8 100644 --- a/tests/phpunit/tests/oembed/template.php +++ b/tests/phpunit/tests/oembed/template.php @@ -20,12 +20,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false === strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) ); $this->assertTrue( false !== strpos( $actual, 'Hello World' ) ); } @@ -46,12 +46,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertFalse( strpos( $actual, 'Page not found' ) ); + $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); $this->assertTrue( false !== strpos( $actual, 'Hello World' ) ); $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) ); } @@ -63,12 +63,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_404', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false !== strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) ); } function test_oembed_output_attachment() { @@ -86,12 +86,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_single', 'is_singular', 'is_attachment', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertFalse( strpos( $actual, 'Page not found' ) ); + $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) ); $this->assertTrue( false !== strpos( $actual, 'Hello World' ) ); $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) ); } @@ -109,12 +109,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_404', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false !== strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) ); } function test_oembed_output_scheduled_post() { @@ -131,12 +131,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_404', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false !== strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) ); } function test_oembed_output_private_post() { @@ -152,12 +152,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_404', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false !== strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) ); } function test_oembed_output_private_post_with_permissions() { @@ -177,12 +177,12 @@ class Tests_Embed_Template extends WP_UnitTestCase { $this->assertQueryTrue( 'is_single', 'is_singular', 'is_embed' ); ob_start(); - include( ABSPATH . WPINC . '/embed-template.php' ); + include( ABSPATH . WPINC . '/theme-compat/embed.php' ); $actual = ob_get_clean(); $doc = new DOMDocument(); $this->assertTrue( $doc->loadHTML( $actual ) ); - $this->assertTrue( false === strpos( $actual, 'Page not found' ) ); + $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) ); $this->assertTrue( false !== strpos( $actual, 'Hello World' ) ); }