Skip to content

Commit 03a5a22

Browse files
committed
HTML API: Use assertEqualHTML() in post filtering tests.
Prep work for #9248.
1 parent 9032503 commit 03a5a22

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/phpunit/tests/post/filtering.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public function test_post_content_unknown_tag() {
3535
$id = self::factory()->post->create( array( 'post_content' => $content ) );
3636
$post = get_post( $id );
3737

38-
$this->assertSame( $expected, $post->post_content );
38+
$this->assertEqualHTML( $expected, $post->post_content );
3939
}
4040

4141
// A simple test to make sure unbalanced tags are fixed.
@@ -52,7 +52,7 @@ public function test_post_content_unbalanced_tag() {
5252
$id = self::factory()->post->create( array( 'post_content' => $content ) );
5353
$post = get_post( $id );
5454

55-
$this->assertSame( $expected, $post->post_content );
55+
$this->assertEqualHTML( $expected, $post->post_content );
5656
}
5757

5858
// Test KSES filtering of disallowed attribute.
@@ -69,7 +69,7 @@ public function test_post_content_disallowed_attr() {
6969
$id = self::factory()->post->create( array( 'post_content' => $content ) );
7070
$post = get_post( $id );
7171

72-
$this->assertSame( $expected, $post->post_content );
72+
$this->assertEqualHTML( $expected, $post->post_content );
7373
}
7474

7575
/**
@@ -89,7 +89,7 @@ public function test_post_content_xhtml_empty_elem() {
8989
$id = self::factory()->post->create( array( 'post_content' => $content ) );
9090
$post = get_post( $id );
9191

92-
$this->assertSame( $expected, $post->post_content );
92+
$this->assertEqualHTML( $expected, $post->post_content );
9393
}
9494

9595
// Make sure unbalanced tags are untouched when the balance option is off.
@@ -109,6 +109,6 @@ public function test_post_content_nobalance_nextpage_more() {
109109
$id = self::factory()->post->create( array( 'post_content' => $content ) );
110110
$post = get_post( $id );
111111

112-
$this->assertSame( $content, $post->post_content );
112+
$this->assertEqualHTML( $content, $post->post_content );
113113
}
114114
}

0 commit comments

Comments
 (0)