0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-11-15 09:38:40 +00:00
htmlpurifier/tests/HTMLPurifier/ConfigSchema/Interchange/Validator/IdExistsTest.php
Edward Z. Yang 8bda0c4dfb [3.1.0] Refactor out validation framework for Interchange
- Implement IdExists validator

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1584 48356398-32a2-884e-a903-53898d9a118a
2008-03-02 01:55:14 +00:00

24 lines
724 B
PHP

<?php
class HTMLPurifier_ConfigSchema_Interchange_Validator_IdExistsTest extends HTMLPurifier_ConfigSchema_Interchange_ValidatorHarness
{
public function setup() {
parent::setup();
$this->validator = new HTMLPurifier_ConfigSchema_Interchange_Validator_IdExists($this->mock);
}
public function testNamespace() {
$this->mock->expectNever('addNamespace');
$this->expectSchemaException('Namespace must have ID');
$this->validator->addNamespace();
}
public function testDirective() {
$this->mock->expectNever('addDirective');
$this->expectSchemaException('Directive must have ID');
$this->validator->addDirective();
}
}