PhpGitHooks\Module\PhpUnit\Contract\CommandHandler\StrictCoverageToolCommandHandler::handle PHP Метод

handle() публичный Метод

public handle ( Bruli\EventBusBundle\CommandBus\CommandInterface $command )
$command Bruli\EventBusBundle\CommandBus\CommandInterface
    public function handle(CommandInterface $command)
    {
        $this->strictCoverageToolExecutor->execute(new MinimumStrictCoverage($command->getMinimumCoverage()), $command->getErrorMessage());
    }

Usage Example

 /**
  * @test
  */
 public function itShouldWorksFine()
 {
     $minimumStrictCoverage = MinimumStrictCoverageStub::create(90.0);
     $outputMessage = new PreCommitOutputWriter(StrictCoverageToolExecutor::EXECUTE_MESSAGE);
     $this->shouldWriteOutput($outputMessage->getMessage());
     $this->shouldProcessStrictCoverage(91.0);
     $this->shouldWriteLnOutput($outputMessage->getSuccessfulMessage());
     $command = new StrictCoverageCommand($minimumStrictCoverage->value(), $this->errorMessage);
     $this->strictCoverageToolCommandHandler->handle($command);
 }
StrictCoverageToolCommandHandler