0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-23 08:51:53 +00:00
htmlpurifier/tests/HTMLPurifier/ConfigSchema/Validator/NamespaceExistsTest.php
2008-03-04 05:21:04 +00:00

19 lines
628 B
PHP

<?php
class HTMLPurifier_ConfigSchema_Validator_NamespaceExistsTest extends HTMLPurifier_ConfigSchema_ValidatorHarness
{
public function testValidateFail() {
$arr = array('_NAMESPACE' => 'Namespace');
$this->expectSchemaException('Cannot define directive for undefined namespace Namespace');
$this->validator->validate($arr, $this->interchange);
}
public function testValidatePass() {
$arr = array('_NAMESPACE' => 'Namespace');
$this->interchange->addNamespace(array('ID' => 'Namespace'));
$this->validator->validate($arr, $this->interchange);
}
}