Пример #1
0
 private function buildModuleList($mods, InputInterface $input, OutputInterface $output)
 {
     $modulesToWrite = array();
     foreach ($mods as $mod) {
         $arrPath = explode(DIRECTORY_SEPARATOR, $mod['path']);
         $module = new Module($arrPath[count($arrPath) - 1], $mod['path']);
         $output->writeln("Detected {$module->getPath()} as a {$mod['framework']} testable module.");
         $question = new ConfirmationQuestion("<question>Add {$module->getName()} to config?</question>", false);
         if (!$this->getHelper('question')->ask($input, $output, $question)) {
             $output->writeln("<comment>Ignoring {$module->getPath()}</comment>");
         } else {
             $modulesToWrite[] = $module;
         }
     }
     return $modulesToWrite;
 }
Пример #2
0
 /**
  * @param Module $module
  * @return boolean
  */
 public function validateModule(Module $module)
 {
     return $this->validatePath($module->getPath());
 }