public handle ( Bruli\EventBusBundle\CommandBus\CommandInterface $command ) | ||
$command | Bruli\EventBusBundle\CommandBus\CommandInterface |
public function handle(CommandInterface $command)
{
$this->phpUnitToolExecutor->execute($command->isRandomMode(), $command->getOptions(), $command->getErrorMessage());
}
/** * @test */ public function itShouldExecuteAndWorksFine() { $options = '--testsuite default'; $errorMessage = HookQuestions::PRE_COMMIT_ERROR_MESSAGE_DEFAULT; $outputMessage = new PreCommitOutputWriter(PhpUnitToolExecutor::EXECUTING_MESSAGE); $this->shouldWriteLnOutput($outputMessage->getMessage()); $this->shouldProcessPhpUnit($options, true); $this->phpUnitToolCommandHandler->handle(new PhpUnitToolCommand(true, $options, $errorMessage)); }