From 4556b6b2a2685c4eb2146b41903f54377a3e68f7 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 12 Jun 2010 23:32:01 -0400 Subject: [PATCH] First pass at moving the GroupTest to a TestSuite. --- cake/tests/groups/helpers.group.php | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/cake/tests/groups/helpers.group.php b/cake/tests/groups/helpers.group.php index 7ec6a913293..97958af061e 100644 --- a/cake/tests/groups/helpers.group.php +++ b/cake/tests/groups/helpers.group.php @@ -26,7 +26,7 @@ * @package cake * @subpackage cake.tests.groups */ -class HelpersGroupTest extends TestSuite { +class HelperGroupTest extends CakeTestSuite { /** * label property @@ -42,8 +42,20 @@ class HelpersGroupTest extends TestSuite { * @access public * @return void */ - function HelpersGroupTest() { - TestManager::addTestFile($this, CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helper'); - TestManager::addTestCasesFromDirectory($this, CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers'); + function __construct($theClass = '', $name = '') { + parent::__construct($theClass, $name); + + $this->addTestFile(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helper.test.php'); + + $helperIterator = new DirectoryIterator(CORE_TEST_CASES . DS . 'libs' . DS . 'view' . DS . 'helpers' . DS); + + // The following test cases cause segfaults for me. + $segfaulty = array('form.test.php', 'html.test.php', 'cache.test.php', 'session.test.php'); + + foreach ($helperIterator as $i => $file) { + if (!$file->isDot() && !in_array($file->getFilename(), $segfaulty)) { + $this->addTestfile($file->getPathname()); + } + } } }