addFileToBlacklist(__FILE__, 'DEFAULT'); App::uses('Folder', 'Utility'); class CakeTestSuite extends PHPUnit_Framework_TestSuite { /** * Adds all the files in a directory to the test suite. Does not recurse through directories. * * @param string $directory The directory to add tests from. * @return void */ public function addTestDirectory($directory = '.') { $Folder = new Folder($directory); list($dirs, $files) = $Folder->read(true, true, true); foreach ($files as $file) { $this->addTestFile($file); } } /** * Recursively adds all the files in a directory to the test suite. * * @param string $directory The directory subtree to add tests from. * @return void */ public function addTestDirectoryRecursive($directory = '.') { $Folder = new Folder($directory); $files = $Folder->tree(null, false, 'files'); foreach ($files as $file) { $this->addTestFile($file); } } }