mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-14 09:18:41 +00:00
59605d592b
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1663 48356398-32a2-884e-a903-53898d9a118a
27 lines
849 B
PHP
27 lines
849 B
PHP
<?php
|
|
|
|
class HTMLPurifier_ConfigSchema_InterchangeTest extends UnitTestCase
|
|
{
|
|
|
|
protected $interchange;
|
|
|
|
public function setup() {
|
|
$this->interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
|
}
|
|
|
|
function testAddNamespace() {
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Namespace();
|
|
$v->namespace = 'Namespace';
|
|
$this->interchange->addNamespace($v);
|
|
$this->assertIdentical($v, $this->interchange->namespaces['Namespace']);
|
|
}
|
|
|
|
function testAddDirective() {
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Directive();
|
|
$v->id = new HTMLPurifier_ConfigSchema_Interchange_Id('Namespace', 'Directive');
|
|
$this->interchange->addDirective($v);
|
|
$this->assertIdentical($v, $this->interchange->directives['Namespace.Directive']);
|
|
}
|
|
|
|
}
|