public function MinifyHtmlUnitTestCase::testMinifyHtmlStripComments in Minify Source HTML 7
Test Minify HTML Comment Stripping.
File
- tests/
minifyhtml.test, line 163
Class
- MinifyHtmlUnitTestCase
- Minify HTML Unit Tests.
Code
public function testMinifyHtmlStripComments() {
$input = "<html>\n";
$input .= " <head>\n";
$input .= " <title>Test HTML</title>\n";
$input .= " </head>\n";
$input .= " <body>\n";
$input .= "<!-- The body goes here //-->";
$input .= " </body>\n";
$input .= "</html>\n";
$expected_output = "<html><head><title>Test HTML</title></head><body></body></html>";
$actual_output = $input;
minifyhtml_minify($actual_output);
$this
->assertEqual($expected_output, $actual_output, 'Minified source matches expected output.');
}