mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 08:51:53 +00:00
c0b5bc3eea
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1599 48356398-32a2-884e-a903-53898d9a118a
21 lines
738 B
PHP
21 lines
738 B
PHP
<?php
|
|
|
|
class HTMLPurifier_ConfigSchema_Validator_UniqueTest extends HTMLPurifier_ConfigSchema_ValidatorHarness
|
|
{
|
|
|
|
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);
|
|
}
|
|
|
|
}
|