Пример #1
0
 /**
  * @covers OckCyp\CoversValidator\Loader\FileLoader::loadFile
  */
 public function testLoadsFile2()
 {
     $this->assertFalse(isset($GLOBALS['cv_global_var']));
     file_put_contents('my2.php', '<?php $cv_global_var = true;');
     FileLoader::loadFile('my2.php');
     $this->assertTrue(isset($GLOBALS['cv_global_var']));
 }
Пример #2
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;
 }