From 17d32bac7fb6efd716852680a6332ae515169080 Mon Sep 17 00:00:00 2001 From: "Edward Z. Yang" Date: Sat, 24 Mar 2007 01:24:38 +0000 Subject: [PATCH] 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 --- tests/HTMLPurifier/HTMLModuleManagerTest.php | 44 ++++++++++++-------- tests/tally_errors.func.php | 2 +- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/tests/HTMLPurifier/HTMLModuleManagerTest.php b/tests/HTMLPurifier/HTMLModuleManagerTest.php index 2aaaa682..7465cf3c 100644 --- a/tests/HTMLPurifier/HTMLModuleManagerTest.php +++ b/tests/HTMLPurifier/HTMLModuleManagerTest.php @@ -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); } diff --git a/tests/tally_errors.func.php b/tests/tally_errors.func.php index 088ff5b8..cd945c3d 100644 --- a/tests/tally_errors.func.php +++ b/tests/tally_errors.func.php @@ -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)); }