public function scan($rootPath) { $rootPath = realpath(APP_ROOT . DIRECTORY_SEPARATOR . $rootPath); $scanner = new RecursiveFileScanner(); $scanner->prepare(RecursiveFileFilter::createExtNameFilter("php")); $types = TypeScanner::scan($scanner->scan($rootPath), array('\\classes\\stereotype\\Component')); return $types; }
/** * * @return PerminatorPHPUnitSuite */ public static function suite() { $suite = new self(); $suite->setName(__CLASS__); $rootPath = realpath(APP_ROOT . 'test'); $scanner = new RecursiveFileScanner(); $scanner->prepare(RecursiveFileFilter::createExtNameFilter("php")); $types = TypeScanner::scan($scanner->scan($rootPath), array('\\PHPUnit_Framework_TestCase'), array(), array()); foreach ($types as $type) { $suite->addTestSuite($type); } return $suite; }