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); } } }