0
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2024-12-23 08:51:53 +00:00
htmlpurifier/tests/HTMLPurifier/ConfigSchema/Validator/ParseIdTest.php

26 lines
764 B
PHP
Raw Normal View History

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