Beispiel #1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $dir = $input->getOption("dir");
     $git = $input->getOption('git');
     $github = $input->getOption('github');
     $branch = $input->getOption('branch');
     if (!empty($github)) {
         $type = TestStartup::TYPE_GITHUB;
         $loc = $github;
     } else {
         if (!empty($git)) {
             $type = TestStartup::TYPE_GIT;
             $loc = $git;
         } else {
             if (!empty($dir)) {
                 $type = TestStartup::TYPE_DIRECTORY;
                 $loc = $dir;
             } else {
                 throw new TestException("Or the git or the dir parameter are required");
             }
         }
     }
     $debug = $input->getOption("debug");
     $output = new Output($output, $debug);
     $output->setFormatter(new OutputFormatter(true));
     new TestStartup($output, $type, $loc, $debug, $branch);
     if ($output->getFatalCount() > 0) {
         return 1;
     }
     return 0;
 }