Changeset 48937 for trunk/tests/phpunit/tests/formatting/JSEscape.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/JSEscape.php
r47122 r48937 7 7 function test_js_escape_simple() { 8 8 $out = esc_js( 'foo bar baz();' ); 9 $this->assert Equals( 'foo bar baz();', $out );9 $this->assertSame( 'foo bar baz();', $out ); 10 10 } 11 11 … … 13 13 $out = esc_js( 'foo "bar" \'baz\'' ); 14 14 // Does it make any sense to change " into "? Why not \"? 15 $this->assert Equals( "foo "bar" \'baz\'", $out );15 $this->assertSame( "foo "bar" \'baz\'", $out ); 16 16 } 17 17 … … 20 20 $out = esc_js( 'foo ' . $bs . 't bar ' . $bs . $bs . ' baz' ); 21 21 // \t becomes t - bug? 22 $this->assert Equals( 'foo t bar ' . $bs . $bs . ' baz', $out );22 $this->assertSame( 'foo t bar ' . $bs . $bs . ' baz', $out ); 23 23 } 24 24 25 25 function test_js_escape_amp() { 26 26 $out = esc_js( 'foo & bar &baz; ' ); 27 $this->assert Equals( 'foo & bar &baz; ', $out );27 $this->assertSame( 'foo & bar &baz; ', $out ); 28 28 } 29 29 30 30 function test_js_escape_quote_entity() { 31 31 $out = esc_js( 'foo ' bar ' baz &' ); 32 $this->assert Equals( "foo \\' bar \\' baz &", $out );32 $this->assertSame( "foo \\' bar \\' baz &", $out ); 33 33 } 34 34
Note: See TracChangeset
for help on using the changeset viewer.