public function MinifyHtmlUnitTestCase::testMinifyHtmlTextareaReplacement in Minify Source HTML 7
Test Minify HTML Textarea Replacement.
File
- tests/
minifyhtml.test, line 31
Class
- MinifyHtmlUnitTestCase
- Minify HTML Unit Tests.
Code
public function testMinifyHtmlTextareaReplacement() {
$input = "<html>\n";
$input .= " <head>\n";
$input .= " <title>Test HTML</title>\n";
$input .= " </head>\n";
$input .= " <body>\n";
$input .= " <textarea cols=\"55\" rows=\"31\">\n";
$input .= "Content in here will not matter.\n";
$input .= "Even multiline content.\n";
$input .= "</textarea>\n";
$input .= " </body>\n";
$input .= "</html>\n";
$expected_output = "<html><head><title>Test HTML</title></head><body><textarea cols=\"55\" rows=\"31\">\n";
$expected_output .= "Content in here will not matter.\n";
$expected_output .= "Even multiline content.\n";
$expected_output .= "</textarea></body></html>";
$actual_output = $input;
minifyhtml_minify($actual_output);
$this
->assertEqual($expected_output, $actual_output, 'Minified source matches expected output.');
}