2008-03-01 17:06:23 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class HTMLPurifier_ConfigSchema_InterchangeTest extends UnitTestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
protected $interchange;
|
|
|
|
|
|
|
|
public function setup() {
|
|
|
|
$this->interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testAddNamespace() {
|
2008-03-22 03:55:59 +00:00
|
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Namespace();
|
|
|
|
$v->namespace = 'Namespace';
|
|
|
|
$this->interchange->addNamespace($v);
|
2008-03-02 04:00:43 +00:00
|
|
|
$this->assertIdentical($v, $this->interchange->namespaces['Namespace']);
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testAddDirective() {
|
2008-03-22 03:55:59 +00:00
|
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Directive();
|
|
|
|
$v->id = new HTMLPurifier_ConfigSchema_Interchange_Id('Namespace', 'Directive');
|
|
|
|
$this->interchange->addDirective($v);
|
2008-03-02 04:00:43 +00:00
|
|
|
$this->assertIdentical($v, $this->interchange->directives['Namespace.Directive']);
|
|
|
|
}
|
|
|
|
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|