Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/phpunit/tests/post/filtering.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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.
Expand All @@ -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 );
}

/**
Expand All @@ -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.
Expand All @@ -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 );
}
}
Loading