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() {
|
|
|
|
$this->interchange->addNamespace($v = array(
|
|
|
|
'ID' => 'Namespace',
|
2008-03-02 01:55:14 +00:00
|
|
|
'DESCRIPTION' => 'Bar',
|
2008-03-01 17:06:23 +00:00
|
|
|
));
|
2008-03-02 01:55:14 +00:00
|
|
|
$this->assertIdentical($v, $this->interchange->getNamespace('Namespace'));
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function testAddDirective() {
|
|
|
|
$this->interchange->addDirective($v = array(
|
|
|
|
'ID' => 'Namespace.Directive',
|
2008-03-02 01:55:14 +00:00
|
|
|
'DESCRIPTION' => 'Bar',
|
2008-03-01 17:06:23 +00:00
|
|
|
));
|
2008-03-02 01:55:14 +00:00
|
|
|
$this->assertIdentical($v, $this->interchange->getDirective('Namespace.Directive'));
|
2008-03-01 17:06:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|