mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 17:01:51 +00:00
14437cbf47
- Enable flush to work when includes are renamed git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1597 48356398-32a2-884e-a903-53898d9a118a
26 lines
881 B
PHP
26 lines
881 B
PHP
<?php
|
|
|
|
class HTMLPurifier_ConfigSchema_Validator_UniqueTest extends HTMLPurifier_ConfigSchema_ValidatorHarness
|
|
{
|
|
|
|
public function setup() {
|
|
parent::setup();
|
|
$this->validator = new HTMLPurifier_ConfigSchema_Validator_Unique();
|
|
}
|
|
|
|
public function testValidateNamespace() {
|
|
$this->interchange->addNamespace(array('ID' => 'Namespace'));
|
|
$this->expectSchemaException('Cannot redefine namespace');
|
|
$arr = array('ID' => 'Namespace');
|
|
$this->validator->validate($arr, $this->interchange);
|
|
}
|
|
|
|
public function testValidateDirective() {
|
|
$this->interchange->addDirective(array('ID' => 'Namespace.Directive'));
|
|
$this->expectSchemaException('Cannot redefine directive');
|
|
$arr = array('ID' => 'Namespace.Directive');
|
|
$this->validator->validate($arr, $this->interchange);
|
|
}
|
|
|
|
}
|