Changeset 47122 for trunk/tests/phpunit/tests/formatting/EscHtml.php
- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/formatting/EscHtml.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/EscHtml.php
r46586 r47122 6 6 class Tests_Formatting_EscHtml extends WP_UnitTestCase { 7 7 function test_esc_html_basics() { 8 // Simple string 8 // Simple string. 9 9 $html = 'The quick brown fox.'; 10 10 $this->assertEquals( $html, esc_html( $html ) ); 11 11 12 // URL with & 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 15 $this->assertEquals( $escaped, esc_html( $html ) ); 16 16 17 // SQL query 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';
Note: See TracChangeset
for help on using the changeset viewer.