File tree Expand file tree Collapse file tree 1 file changed +22
-19
lines changed
tests/phpunit/tests/customize Expand file tree Collapse file tree 1 file changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -389,11 +389,12 @@ public function test_wp_custom_css_cb_escapes_dangerous_html() {
389389 )
390390 );
391391 $ output = get_echo ( 'wp_custom_css_cb ' );
392- $ expected = <<<'HTML'
393- <style id="wp-custom-css">
394- *::before { content: "\3c\2fstyle><script>alert(1)</script>"; }
395- </style>
396- HTML;
392+ $ expected =
393+ <<<'HTML'
394+ <style id="wp-custom-css">
395+ *::before { content: "\3c\2fstyle><script>alert(1)</script>"; }
396+ </style>
397+ HTML;
397398 $ this ->assertEqualHTML ( $ expected , $ output );
398399 }
399400
@@ -426,13 +427,14 @@ public function test_validate_basic_css() {
426427 * @covers WP_Customize_Custom_CSS_Setting::validate
427428 */
428429 public function test_validate_accepts_css_property_at_rule () {
429- $ css = <<<'CSS'
430- @property --animate {
431- syntax: "<custom-ident>";
432- inherits: true;
433- initial-value: false;
434- }
435- CSS;
430+ $ css =
431+ <<<'CSS'
432+ @property --animate {
433+ syntax: "<custom-ident>";
434+ inherits: true;
435+ initial-value: false;
436+ }
437+ CSS;
436438 $ this ->assertTrue ( $ this ->setting ->validate ( $ css ) );
437439 }
438440
@@ -442,13 +444,14 @@ public function test_validate_accepts_css_property_at_rule() {
442444 * @covers ::wp_custom_css_cb
443445 */
444446 public function test_save_and_print_property_at_rule () {
445- $ css = <<<'CSS'
446- @property --animate {
447- syntax: "<custom-ident>";
448- inherits: true;
449- initial-value: false;
450- }
451- CSS;
447+ $ css =
448+ <<<'CSS'
449+ @property --animate {
450+ syntax: "<custom-ident>";
451+ inherits: true;
452+ initial-value: false;
453+ }
454+ CSS;
452455 wp_update_custom_css_post ( $ css , array ( 'stylesheet ' => $ this ->setting ->stylesheet ) );
453456 $ output = get_echo ( 'wp_custom_css_cb ' );
454457 $ expected = "<style id='wp-custom-css'> \n{$ css }\n</style> \n" ;
You can’t perform that action at this time.
0 commit comments