diff --git a/tests/phpunit/tests/post/filtering.php b/tests/phpunit/tests/post/filtering.php index 5947a29d43cfc..a44ad873001fb 100644 --- a/tests/phpunit/tests/post/filtering.php +++ b/tests/phpunit/tests/post/filtering.php @@ -35,7 +35,7 @@ public function test_post_content_unknown_tag() { $id = self::factory()->post->create( array( 'post_content' => $content ) ); $post = get_post( $id ); - $this->assertSame( $expected, $post->post_content ); + $this->assertEqualHTML( $expected, $post->post_content ); } // A simple test to make sure unbalanced tags are fixed. @@ -52,7 +52,7 @@ public function test_post_content_unbalanced_tag() { $id = self::factory()->post->create( array( 'post_content' => $content ) ); $post = get_post( $id ); - $this->assertSame( $expected, $post->post_content ); + $this->assertEqualHTML( $expected, $post->post_content ); } // Test KSES filtering of disallowed attribute. @@ -69,7 +69,7 @@ public function test_post_content_disallowed_attr() { $id = self::factory()->post->create( array( 'post_content' => $content ) ); $post = get_post( $id ); - $this->assertSame( $expected, $post->post_content ); + $this->assertEqualHTML( $expected, $post->post_content ); } /** @@ -89,7 +89,7 @@ public function test_post_content_xhtml_empty_elem() { $id = self::factory()->post->create( array( 'post_content' => $content ) ); $post = get_post( $id ); - $this->assertSame( $expected, $post->post_content ); + $this->assertEqualHTML( $expected, $post->post_content ); } // Make sure unbalanced tags are untouched when the balance option is off. @@ -109,6 +109,6 @@ public function test_post_content_nobalance_nextpage_more() { $id = self::factory()->post->create( array( 'post_content' => $content ) ); $post = get_post( $id ); - $this->assertSame( $content, $post->post_content ); + $this->assertEqualHTML( $content, $post->post_content ); } }