public function MinifyHtmlUnitTestCase::testMinifyHtmlStyleReplacement in Minify Source HTML 7
Test Minify HTML Style Replacement.
File
- tests/
minifyhtml.test, line 137
Class
- MinifyHtmlUnitTestCase
- Minify HTML Unit Tests.
Code
public function testMinifyHtmlStyleReplacement() {
$input = "<html>\n";
$input .= " <head>\n";
$input .= " <title>Test HTML</title>\n";
$input .= " </head>\n";
$input .= " <body>\n";
$input .= " <style>\n";
$input .= "body { color: #fff; }\n";
$input .= " </style>\n";
$input .= " </body>\n";
$input .= "</html>\n";
$expected_output = "<html><head><title>Test HTML</title></head><body><style>\n";
$expected_output .= "body { color: #fff; }\n";
$expected_output .= "</style></body></html>";
$actual_output = $input;
minifyhtml_minify($actual_output);
$this
->assertEqual($expected_output, $actual_output, 'Minified source matches expected output.');
}