mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-10-16 06:26:08 +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:
25
tests/HTMLPurifier/ConfigSchema/Validator/ParseIdTest.php
Normal file
25
tests/HTMLPurifier/ConfigSchema/Validator/ParseIdTest.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
class HTMLPurifier_ConfigSchema_Validator_ParseIdTest extends HTMLPurifier_ConfigSchema_ValidatorHarness
|
||||
{
|
||||
|
||||
public function testValidateNamespace() {
|
||||
$arr = array('ID' => 'Namespace');
|
||||
$this->validator->validate($arr, $this->interchange);
|
||||
$this->assertIdentical($arr, array(
|
||||
'ID' => 'Namespace',
|
||||
'_NAMESPACE' => 'Namespace'
|
||||
));
|
||||
}
|
||||
|
||||
public function testValidateDirective() {
|
||||
$arr = array('ID' => 'Namespace.Directive');
|
||||
$this->validator->validate($arr, $this->interchange);
|
||||
$this->assertIdentical($arr, array(
|
||||
'ID' => 'Namespace.Directive',
|
||||
'_NAMESPACE' => 'Namespace',
|
||||
'_DIRECTIVE' => 'Directive'
|
||||
));
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user