WordPress.org

Make WordPress Core

Ticket #30032: 30032.fix-unit-tests.diff

File 30032.fix-unit-tests.diff, 1.5 KB (added by georgestephanis, 6 years ago)
  • tests/phpunit/tests/dependencies/styles.php

     
    9898                $style .= "}";
    9999               
    100100                $expected  = "<link rel='stylesheet' id='handle-css'  href='http://example.com?ver=1' type='text/css' media='all' />\n";
    101                 $expected .= "<style type='text/css'>\n";
     101                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    102102                $expected .= "$style\n";
    103103                $expected .= "</style>\n";
    104104
     
    126126                $style .= "}";
    127127
    128128                $expected  = "<link rel='stylesheet' id='handle-css'  href='http://example.com?ver=1' type='text/css' media='all' />\n";
    129                 $expected .= "<style type='text/css'>\n";
     129                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    130130                $expected .= "$style\n";
    131131                $expected .= "</style>\n";
    132132
     
    153153                $style2 .= "}";
    154154
    155155                $expected  = "<link rel='stylesheet' id='handle-css'  href='http://example.com?ver=1' type='text/css' media='all' />\n";
    156                 $expected .= "<style type='text/css'>\n";
     156                $expected .= "<style id='handle-inline-css' type='text/css'>\n";
    157157                $expected .= "$style1\n";
    158158                $expected .= "$style2\n";
    159159                $expected .= "</style>\n";
     
    175175         */
    176176        public function test_plugin_doing_inline_styles_wrong() {
    177177
    178                 $style  = "<style type='text/css'>\n";
     178                $style  = "<style id='handle-inline-css' type='text/css'>\n";
    179179                $style .= ".thing {\n";
    180180                $style .= "\tbackground: red;\n";
    181181                $style .= "}\n";