Skip to content

Commit

Permalink
First pass at moving the GroupTest to a TestSuite.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Jun 13, 2010
1 parent 6300027 commit 4556b6b
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions cake/tests/groups/helpers.group.php
Expand Up @@ -26,7 +26,7 @@
* @package cake
* @subpackage cake.tests.groups
*/
class HelpersGroupTest extends TestSuite {
class HelperGroupTest extends CakeTestSuite {

/**
* label property
Expand All @@ -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());
}
}
}
}

0 comments on commit 4556b6b

Please sign in to comment.