Changeset 60974
- Timestamp:
- 10/19/2025 12:32:32 AM (less than one hour ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/wpRelNofollow.php
r55289 r60974 13 13 public function test_add_no_follow() { 14 14 $content = '<p>This is some cool <a href="/">Code</a></p>'; 15 $expected = '<p>This is some cool <a href= \"/\" rel=\"nofollow\">Code</a></p>';16 $this->assert Same( $expected, wp_rel_nofollow( $content) );15 $expected = '<p>This is some cool <a href="/" rel="nofollow">Code</a></p>'; 16 $this->assertEqualHTML( $expected, stripslashes( wp_rel_nofollow( $content ) ) ); 17 17 } 18 18 … … 22 22 public function test_convert_no_follow() { 23 23 $content = '<p>This is some cool <a href="/" rel="weird">Code</a></p>'; 24 $expected = '<p>This is some cool <a href= \"/\" rel=\"weird nofollow\">Code</a></p>';25 $this->assert Same( $expected, wp_rel_nofollow( $content) );24 $expected = '<p>This is some cool <a href="/" rel="weird nofollow">Code</a></p>'; 25 $this->assertEqualHTML( $expected, stripslashes( wp_rel_nofollow( $content ) ) ); 26 26 } 27 27 … … 31 31 */ 32 32 public function test_wp_rel_nofollow( $input, $output, $expect_deprecation = false ) { 33 $this->assert Same( wp_slash( $output ), wp_rel_nofollow( $input) );33 $this->assertEqualHTML( $output, stripslashes( wp_rel_nofollow( $input ) ) ); 34 34 } 35 35 … … 81 81 public function test_append_no_follow_with_valueless_attribute() { 82 82 $content = '<p>This is some cool <a href="demo.com" download rel="hola">Code</a></p>'; 83 $expected = '<p>This is some cool <a href= \"demo.com\" download rel=\"hola nofollow\">Code</a></p>';84 $this->assert Same( $expected, wp_rel_nofollow( $content) );83 $expected = '<p>This is some cool <a href="demo.com" download rel="hola nofollow">Code</a></p>'; 84 $this->assertEqualHTML( $expected, stripslashes( wp_rel_nofollow( $content ) ) ); 85 85 } 86 86 }
Note: See TracChangeset
for help on using the changeset viewer.