mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-23 00:41:52 +00:00
Almost release 1.5.0. Merged in a few strict changes.
git-svn-id: http://htmlpurifier.org/svnroot/htmlpurifier/trunk@870 48356398-32a2-884e-a903-53898d9a118a
This commit is contained in:
parent
e2babe5308
commit
17d32bac7f
@ -187,37 +187,45 @@ class HTMLPurifier_HTMLModuleManagerTest extends UnitTestCase
|
|||||||
$this->expectError( // active variables, watch out!
|
$this->expectError( // active variables, watch out!
|
||||||
'Illegal inclusion array at index 1 found collection HTML, '.
|
'Illegal inclusion array at index 1 found collection HTML, '.
|
||||||
'inclusion arrays must be at start of collection (index 0)');
|
'inclusion arrays must be at start of collection (index 0)');
|
||||||
$this->manager->processCollections(
|
$c = array(
|
||||||
$c = array(
|
'HTML' => array('Legacy', array('XHTML')),
|
||||||
'HTML' => array('Legacy', array('XHTML')),
|
'XHTML' => array('Text', 'Hypertext')
|
||||||
'XHTML' => array('Text', 'Hypertext')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
$this->manager->processCollections($c);
|
||||||
|
unset($c);
|
||||||
|
|
||||||
$this->expectError('Collection HTML references undefined '.
|
$this->expectError('Collection HTML references undefined '.
|
||||||
'module Foobar');
|
'module Foobar');
|
||||||
$this->manager->processCollections(
|
$c = array(
|
||||||
$c = array(
|
'HTML' => array('Foobar')
|
||||||
'HTML' => array('Foobar')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
$this->manager->processCollections($c);
|
||||||
|
unset($c);
|
||||||
|
|
||||||
$this->expectError('Collection HTML tried to include undefined '.
|
$this->expectError('Collection HTML tried to include undefined '.
|
||||||
'collection _Common');
|
'collection _Common');
|
||||||
$this->manager->processCollections(
|
$c = array(
|
||||||
$c = array(
|
'HTML' => array(array('_Common'), 'Legacy')
|
||||||
'HTML' => array(array('_Common'), 'Legacy')
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
$this->manager->processCollections($c);
|
||||||
|
unset($c);
|
||||||
|
|
||||||
// reports the first circular inclusion it runs across
|
// reports the first circular inclusion it runs across
|
||||||
$this->expectError('Circular inclusion detected in HTML collection');
|
$this->expectError('Circular inclusion detected in HTML collection');
|
||||||
$this->manager->processCollections(
|
$c = array(
|
||||||
$c = array(
|
'HTML' => array(array('XHTML')),
|
||||||
'HTML' => array(array('XHTML')),
|
'XHTML' => array(array('HTML'))
|
||||||
'XHTML' => array(array('HTML'))
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
|
$this->manager->processCollections($c);
|
||||||
|
unset($c);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ function tally_errors($test) {
|
|||||||
foreach ($queue->_expectation_queue as $e) {
|
foreach ($queue->_expectation_queue as $e) {
|
||||||
if (count($e) != 2) return; // fut-compat
|
if (count($e) != 2) return; // fut-compat
|
||||||
if (!isset($e[0])) return; // fut-compat
|
if (!isset($e[0])) return; // fut-compat
|
||||||
$e[0]->_dumper = &new SimpleDumper();
|
$e[0]->_dumper = new SimpleDumper();
|
||||||
$test->fail('Error expectation not fulfilled: ' .
|
$test->fail('Error expectation not fulfilled: ' .
|
||||||
$e[0]->testMessage(null));
|
$e[0]->testMessage(null));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user