Exemplo n.º 1
0
 /**
  * Handle console input
  *
  * @param InputInterface $input
  * @return Configuration
  */
 public static function handleInput(InputInterface $input)
 {
     $configOption = $input->getOption('configuration');
     $configFile = ConfigLocator::locate($configOption);
     $configuration = ConfigLoader::loadConfig($configFile);
     $phpunit = $configuration->getPHPUnitConfiguration();
     if (null !== $input->getOption('bootstrap')) {
         $phpunit['bootstrap'] = $input->getOption('bootstrap');
     }
     if (isset($phpunit['bootstrap'])) {
         FileLoader::loadFile($phpunit['bootstrap']);
     }
     return $configuration;
 }
Exemplo n.º 2
0
 /**
  * @covers OckCyp\CoversValidator\Locator\ConfigLocator::locate
  */
 public function testReturnsNullWhenConfigFileDoesNotExist()
 {
     $this->assertNull(ConfigLocator::locate(null));
 }