Changeset 48937 for trunk/tests/phpunit/tests/formatting/EscHtml.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscHtml.php
r47122 r48937 8 8 // Simple string. 9 9 $html = 'The quick brown fox.'; 10 $this->assert Equals( $html, esc_html( $html ) );10 $this->assertSame( $html, esc_html( $html ) ); 11 11 12 12 // URL with &. 13 13 $html = 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985'; 14 14 $escaped = 'http://localhost/trunk/wp-login.php?action=logout&_wpnonce=cd57d75985'; 15 $this->assert Equals( $escaped, esc_html( $html ) );15 $this->assertSame( $escaped, esc_html( $html ) ); 16 16 17 17 // SQL query. 18 18 $html = "SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1"; 19 19 $escaped = 'SELECT meta_key, meta_value FROM wp_trunk_sitemeta WHERE meta_key IN ('site_name', 'siteurl', 'active_sitewide_plugins', '_site_transient_timeout_theme_roots', '_site_transient_theme_roots', 'site_admins', 'can_compress_scripts', 'global_terms_enabled') AND site_id = 1'; 20 $this->assert Equals( $escaped, esc_html( $html ) );20 $this->assertSame( $escaped, esc_html( $html ) ); 21 21 } 22 22 … … 24 24 $source = 'penn & teller & at&t'; 25 25 $res = 'penn & teller & at&t'; 26 $this->assert Equals( $res, esc_html( $source ) );26 $this->assertSame( $res, esc_html( $source ) ); 27 27 } 28 28 … … 30 30 $source = 'this > that < that <randomhtml />'; 31 31 $res = 'this > that < that <randomhtml />'; 32 $this->assert Equals( $res, esc_html( $source ) );32 $this->assertSame( $res, esc_html( $source ) ); 33 33 } 34 34 … … 36 36 $source = '& £ " &'; 37 37 $res = '& £ " &'; 38 $this->assert Equals( $res, esc_html( $source ) );38 $this->assertSame( $res, esc_html( $source ) ); 39 39 } 40 40 }
Note: See TracChangeset
for help on using the changeset viewer.