1
0
mirror of https://github.com/ezyang/htmlpurifier.git synced 2025-07-31 03:10:09 +02:00

[1.3.0] Some housekeeping after the last commit

- Add a few missing unit tests
- Allow for spaces between comma separated strings to be transformed into arrays
- smoketests/printDefinition.php now has documentation, links to more documentation and a friendly user-interface

git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@579 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
Edward Z. Yang
2006-11-24 07:12:16 +00:00
parent 73a1e31fad
commit b63b0be21f
4 changed files with 46 additions and 7 deletions

View File

@@ -284,6 +284,11 @@ class HTMLPurifier_ConfigSchemaTest extends UnitTestCase
$this->assertInvalid(array(0 => 'moo'), 'hash');
$this->assertValid(array(1 => 'moo'), 'hash');
$this->assertValid(23, 'mixed');
$this->assertValid('foo,bar, cow', 'list', array('foo', 'bar', 'cow'));
$this->assertValid('foo,bar', 'lookup', array('foo' => true, 'bar' => true));
$this->assertValid('true', 'bool', true);
$this->assertValid('false', 'bool', false);
$this->assertValid('1', 'bool', true);
}

View File

@@ -106,6 +106,20 @@ class HTMLPurifier_ConfigTest extends UnitTestCase
$this->assertError('Value is of invalid type');
$this->assertNoErrors();
// grab a namespace
$config->set('Attr', 'Key', 0xBEEF);
$this->assertIdentical(
$config->getBatch('Attr'),
array(
'Key' => 0xBEEF
)
);
// grab a non-existant namespace
$config->getBatch('FurnishedGoods');
$this->assertError('Cannot retrieve undefined namespace');
$this->assertNoErrors();
}
function test_getDefinition() {