1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-08-05 13:47:24 +02:00

[3.1.0] Create decorator validator/adapter for Interchange.

- Output flush output

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1587 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2008-03-02 04:00:43 +00:00
parent d81bcbd208
commit 0d9c05d13c
7 changed files with 99 additions and 24 deletions

View File

@@ -14,7 +14,7 @@ class HTMLPurifier_ConfigSchema_InterchangeTest extends UnitTestCase
'ID' => 'Namespace',
'DESCRIPTION' => 'Bar',
));
$this->assertIdentical($v, $this->interchange->getNamespace('Namespace'));
$this->assertIdentical($v, $this->interchange->namespaces['Namespace']);
}
public function testAddDirective() {
@@ -22,7 +22,13 @@ class HTMLPurifier_ConfigSchema_InterchangeTest extends UnitTestCase
'ID' => 'Namespace.Directive',
'DESCRIPTION' => 'Bar',
));
$this->assertIdentical($v, $this->interchange->getDirective('Namespace.Directive'));
$this->assertIdentical($v, $this->interchange->directives['Namespace.Directive']);
}
public function testValidator() {
$adapter = $this->interchange->getValidatorAdapter();
$this->expectException(new HTMLPurifier_ConfigSchema_Exception('ID must exist in directive'));
$adapter->addDirective(array());
}
}