Exemple #1
0
 private function loadModules($modules, $pathPrefix)
 {
     foreach ($modules as $definition) {
         $module = new Module($definition['name'], $pathPrefix . '/' . $definition['path']);
         $this->modules[$module->getName()] = $module;
     }
 }
Exemple #2
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;
 }
Exemple #3
0
 /**
  * @param Module $module
  * @return boolean
  */
 public function validateModule(Module $module)
 {
     return $this->validatePath($module->getPath());
 }