mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-11-10 07:38:41 +00:00
ec59062a9d
- Optimize ConfigSchema by removing non-essential runtime data. We can probably optimize even more by collapsing object structures to arrays. - Removed validation data from ConfigSchema; this will be reimplemented on Interchange - Implement a sane Interchange composite hierarchy that doesn't use arrays - Implement StringHash -> Interchange -> ConfigSchema, and rewrite maintenance file to account for this git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1615 48356398-32a2-884e-a903-53898d9a118a
27 lines
863 B
PHP
27 lines
863 B
PHP
<?php
|
|
|
|
class HTMLPurifier_ConfigSchema_InterchangeTest extends UnitTestCase
|
|
{
|
|
|
|
protected $interchange;
|
|
|
|
public function setup() {
|
|
$this->interchange = new HTMLPurifier_ConfigSchema_Interchange();
|
|
}
|
|
|
|
public function testAddNamespace() {
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Namespace();
|
|
$v->namespace = 'Namespace';
|
|
$this->interchange->addNamespace($v);
|
|
$this->assertIdentical($v, $this->interchange->namespaces['Namespace']);
|
|
}
|
|
|
|
public function testAddDirective() {
|
|
$v = new HTMLPurifier_ConfigSchema_Interchange_Directive();
|
|
$v->id = new HTMLPurifier_ConfigSchema_Interchange_Id('Namespace', 'Directive');
|
|
$this->interchange->addDirective($v);
|
|
$this->assertIdentical($v, $this->interchange->directives['Namespace.Directive']);
|
|
}
|
|
|
|
}
|