mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-15 09:38:40 +00:00
8bda0c4dfb
- Implement IdExists validator git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1584 48356398-32a2-884e-a903-53898d9a118a
24 lines
724 B
PHP
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();
|
|
}
|
|
|
|
}
|