mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-07-31 03:10:09 +02:00
Emit errors when body is extracted.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
This commit is contained in:
@@ -13,6 +13,11 @@ class HTMLPurifier_Lexer_DirectLex_ErrorsTest extends HTMLPurifier_ErrorsHarness
|
||||
$lexer->parseAttributeString($input, $this->config, $this->context);
|
||||
}
|
||||
|
||||
function testExtractBody() {
|
||||
$this->expectErrorCollection(E_WARNING, 'Lexer: Extracted body');
|
||||
$this->invoke('<body>foo</body>');
|
||||
}
|
||||
|
||||
function testUnclosedComment() {
|
||||
$this->expectErrorCollection(E_WARNING, 'Lexer: Unclosed comment');
|
||||
$this->expectContext('CurrentLine', 1);
|
||||
|
Reference in New Issue
Block a user