mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2025-08-06 14:16:32 +02:00
Remove some vestigial SimpleTest code, fix some tests, also reload the includes.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@1654 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
@@ -9,10 +9,6 @@ class HTMLPurifier_ConfigSchemaTest extends HTMLPurifier_Harness
|
||||
$this->schema = new HTMLPurifier_ConfigSchema();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
tally_errors($this);
|
||||
}
|
||||
|
||||
function test_defineNamespace() {
|
||||
$this->schema->addNamespace('http');
|
||||
$this->assertIdentical($this->schema->info['http'], array());
|
||||
|
@@ -10,10 +10,6 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
|
||||
$this->schema = new HTMLPurifier_ConfigSchema();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
tally_errors($this);
|
||||
}
|
||||
|
||||
// test functionality based on ConfigSchema
|
||||
|
||||
function testNormal() {
|
||||
@@ -129,7 +125,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
|
||||
function testNull() {
|
||||
|
||||
$this->schema->addNamespace('ReportCard');
|
||||
$this->schema->add('ReportCard', 'English', null, 'string', false);
|
||||
$this->schema->add('ReportCard', 'English', null, 'string', true);
|
||||
$this->schema->add('ReportCard', 'Absences', 0, 'int', false);
|
||||
|
||||
$config = new HTMLPurifier_Config($this->schema);
|
||||
@@ -266,7 +262,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
|
||||
|
||||
function test_getDefinition() {
|
||||
$this->schema->addNamespace('Cache', 'Cache stuff');
|
||||
$this->schema->add('Cache', 'DefinitionImpl', null, 'string/null', 'Cache?');
|
||||
$this->schema->add('Cache', 'DefinitionImpl', null, 'string', true);
|
||||
$this->schema->addNamespace('Crust', 'Krusty Krabs');
|
||||
$config = new HTMLPurifier_Config($this->schema);
|
||||
$this->expectError("Definition of Crust type not supported");
|
||||
@@ -361,7 +357,7 @@ class HTMLPurifier_ConfigTest extends HTMLPurifier_Harness
|
||||
|
||||
}
|
||||
|
||||
function __onlytest_loadArrayFromForm() {
|
||||
function test_loadArrayFromForm() {
|
||||
|
||||
$this->schema->addNamespace('Pancake');
|
||||
$this->schema->add('Pancake', 'Mix', 'buttermilk', 'string', false);
|
||||
|
@@ -64,6 +64,7 @@ class HTMLPurifier_Harness extends UnitTestCase
|
||||
// __onlytest makes only one test get triggered
|
||||
foreach (get_class_methods(get_class($this)) as $method) {
|
||||
if (strtolower(substr($method, 0, 10)) == '__onlytest') {
|
||||
$this->_reporter->paintSkip('All test methods in ' . $this->_label . ' besides ' . $method);
|
||||
return array($method);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user