/** * @covers ::merge * @covers ::mergeConfigurationArrays */ public function testMerge() { $configuration = new Configuration(); $this->assertTrue($configuration['phpunit']['enabled']); $configuration->merge(['phpunit' => ['enabled' => false]]); $this->assertFalse($configuration['phpunit']['enabled']); }
/** * @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']); }
/** * @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); }