mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-04 21:28:06 +02:00
[1.2.0]
- Partially finished migrating to new Context object (done in r485). - Created HTMLPurifier_Harness to assist with testing, ChildDefTest migrated to that framework. git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@484 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -53,9 +53,11 @@ class HTMLPurifier_Lexer_DirectLexTest extends UnitTestCase
|
||||
$input[10] = 'name="input" selected';
|
||||
$expect[10] = array('name' => 'input', 'selected' => 'selected');
|
||||
|
||||
$config = HTMLPurifier_Config::createDefault();
|
||||
$context = new HTMLPurifier_Context();
|
||||
$size = count($input);
|
||||
for($i = 0; $i < $size; $i++) {
|
||||
$result = $this->DirectLex->parseAttributeString($input[$i]);
|
||||
$result = $this->DirectLex->parseAttributeString($input[$i], $config, $context);
|
||||
$this->assertEqual($expect[$i], $result, 'Test ' . $i . ': %s');
|
||||
paintIf($result, $expect[$i] != $result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user