@@ -13,7 +13,7 @@ class Tests_Formatting_wpRelUgc extends WP_UnitTestCase {
1313 public function test_add_ugc () {
1414 $ content = '<p>This is some cool <a href="/">Code</a></p> ' ;
1515 $ expected = '<p>This is some cool <a href=\"/\" rel=\"nofollow ugc\">Code</a></p> ' ;
16- $ this ->assertSame ( $ expected , wp_rel_ugc ( $ content ) );
16+ $ this ->assertEqualHTML ( $ expected , wp_rel_ugc ( $ content ) );
1717 }
1818
1919 /**
@@ -22,15 +22,15 @@ public function test_add_ugc() {
2222 public function test_convert_ugc () {
2323 $ content = '<p>This is some cool <a href="/" rel="weird">Code</a></p> ' ;
2424 $ expected = '<p>This is some cool <a href=\"/\" rel=\"weird nofollow ugc\">Code</a></p> ' ;
25- $ this ->assertSame ( $ expected , wp_rel_ugc ( $ content ) );
25+ $ this ->assertEqualHTML ( $ expected , wp_rel_ugc ( $ content ) );
2626 }
2727
2828 /**
2929 * @ticket 48022
3030 * @dataProvider data_wp_rel_ugc
3131 */
3232 public function test_wp_rel_ugc ( $ input , $ output , $ expect_deprecation = false ) {
33- $ this ->assertSame ( wp_slash ( $ output ), wp_rel_ugc ( $ input ) );
33+ $ this ->assertEqualHTML ( wp_slash ( $ output ), wp_rel_ugc ( $ input ) );
3434 }
3535
3636 public function data_wp_rel_ugc () {
@@ -82,6 +82,6 @@ public function test_append_ugc_with_valueless_attribute() {
8282
8383 $ content = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p> ' ;
8484 $ expected = '<p>This is some cool <a href=\"demo.com\" download rel=\"hola nofollow ugc\">Code</a></p> ' ;
85- $ this ->assertSame ( $ expected , wp_rel_ugc ( $ content ) );
85+ $ this ->assertEqualHTML ( $ expected , wp_rel_ugc ( $ content ) );
8686 }
8787}
0 commit comments