mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-10-17 06:56:06 +02:00
[3.1.0] Implement NamespaceExists and ParseId
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1599 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?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);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user