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

24 lines
724 B
PHP
Raw Normal View History

<?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();
}
}