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

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

public handle ( Bruli\EventBusBundle\CommandBus\CommandInterface $command )
$command Bruli\EventBusBundle\CommandBus\CommandInterface
    public function handle(CommandInterface $command)
    {
        $this->guardCoverageTool->run($command->getWarningMessage());
    }

Usage Example

 /**
  * @test
  */
 public function itShouldWorksFine()
 {
     $outputMessage = new PreCommitOutputWriter(GuardCoverageTool::CHECKING_MESSAGE);
     $currentCoverage = 70.0;
     $previousCoverage = 60.0;
     $this->shouldProcessStrictCoverage($currentCoverage);
     $this->shouldWriteOutput($outputMessage->getMessage());
     $this->shouldReadGuardCoverage($previousCoverage);
     $this->shouldWriteLnOutput($this->buildStrictCoverageSuccessfulMessage($currentCoverage, $previousCoverage, $outputMessage->getSuccessfulMessage()));
     $this->shouldWriteGuardCoverage($currentCoverage);
     $this->guardCoverageToolCommandHandler->handle(new GuardCoverageCommand(HookQuestions::PHPUNIT_GUARD_COVERAGE_MESSAGE_DEFAULT));
 }
GuardCoverageToolCommandHandler