mirror of
https://github.com/ezyang/htmlpurifier.git
synced 2024-12-22 08:21: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!
|
||||
'Illegal inclusion array at index 1 found collection HTML, '.
|
||||
'inclusion arrays must be at start of collection (index 0)');
|
||||
$this->manager->processCollections(
|
||||
$c = array(
|
||||
'HTML' => array('Legacy', array('XHTML')),
|
||||
'XHTML' => array('Text', 'Hypertext')
|
||||
)
|
||||
$c = array(
|
||||
'HTML' => array('Legacy', array('XHTML')),
|
||||
'XHTML' => array('Text', 'Hypertext')
|
||||
|
||||
|
||||
);
|
||||
$this->manager->processCollections($c);
|
||||
unset($c);
|
||||
|
||||
$this->expectError('Collection HTML references undefined '.
|
||||
'module Foobar');
|
||||
$this->manager->processCollections(
|
||||
$c = array(
|
||||
'HTML' => array('Foobar')
|
||||
)
|
||||
$c = array(
|
||||
'HTML' => array('Foobar')
|
||||
|
||||
|
||||
);
|
||||
$this->manager->processCollections($c);
|
||||
unset($c);
|
||||
|
||||
$this->expectError('Collection HTML tried to include undefined '.
|
||||
'collection _Common');
|
||||
$this->manager->processCollections(
|
||||
$c = array(
|
||||
'HTML' => array(array('_Common'), 'Legacy')
|
||||
)
|
||||
$c = array(
|
||||
'HTML' => array(array('_Common'), 'Legacy')
|
||||
|
||||
|
||||
);
|
||||
$this->manager->processCollections($c);
|
||||
unset($c);
|
||||
|
||||
// reports the first circular inclusion it runs across
|
||||
$this->expectError('Circular inclusion detected in HTML collection');
|
||||
$this->manager->processCollections(
|
||||
$c = array(
|
||||
'HTML' => array(array('XHTML')),
|
||||
'XHTML' => array(array('HTML'))
|
||||
)
|
||||
$c = array(
|
||||
'HTML' => array(array('XHTML')),
|
||||
'XHTML' => array(array('HTML'))
|
||||
|
||||
|
||||
);
|
||||
$this->manager->processCollections($c);
|
||||
unset($c);
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@ function tally_errors($test) {
|
||||
foreach ($queue->_expectation_queue as $e) {
|
||||
if (count($e) != 2) 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: ' .
|
||||
$e[0]->testMessage(null));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user