mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
8bda0c4dfb
- Implement IdExists validator git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1584 48356398-32a2-884e-a903-53898d9a118a
29 lines
791 B
PHP
29 lines
791 B
PHP
<?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',
|
|
'DESCRIPTION' => 'Bar',
|
|
));
|
|
$this->assertIdentical($v, $this->interchange->getNamespace('Namespace'));
|
|
}
|
|
|
|
public function testAddDirective() {
|
|
$this->interchange->addDirective($v = array(
|
|
'ID' => 'Namespace.Directive',
|
|
'DESCRIPTION' => 'Bar',
|
|
));
|
|
$this->assertIdentical($v, $this->interchange->getDirective('Namespace.Directive'));
|
|
}
|
|
|
|
}
|