Пример #1
0
 /**
  * @covers ::offsetUnset
  */
 public function testOffsetUnset()
 {
     $configuration = new Configuration();
     $this->assertNotNull($configuration->offsetGet('phpunit'));
     $configuration->offsetUnset('phpunit');
     $this->assertNull($configuration->offsetGet('phpunit'));
 }
Пример #2
0
 /**
  * @covers ::getConfiguration
  * @covers ::setConfiguration
  */
 public function testCanSetAndGetConfiguration()
 {
     $newConfiguration = new Configuration();
     $newConfiguration->merge(['phpunit' => ['enabled' => false]]);
     $this->app->setConfiguration($newConfiguration);
     $configuration = $this->app->getConfiguration();
     $this->assertFalse($configuration['phpunit']['enabled']);
 }
Пример #3
0
 /**
  * @covers ::run
  * @covers \PhpHooks\Abstracts\BaseCommand::doExecute
  */
 public function testRun()
 {
     $configuration = new Configuration();
     $configuration->merge(['phpunit' => ['configuration' => realpath(__DIR__ . '/../Fixtures/PhpUnit/phpunit.xml')]]);
     $input = $this->input;
     $input->setArgument('configuration', serialize($configuration));
     $command = new PhpunitCommand();
     $this->setExpectedExceptionRegExp('RuntimeException', '/Tests\\: 1\\, Assertions\\: 1\\, Failures\\: 1\\./');
     $command->run($input, $this->output);
 }