1
0
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:
Edward Z. Yang
2010-05-04 13:41:09 -04:00
parent f4c6e10ff7
commit 1a70bffd5a
4 changed files with 18 additions and 1 deletions

View File

@@ -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);