@@ 61-76 (lines=16) @@ | ||
58 | /** |
|
59 | * @test |
|
60 | */ |
|
61 | public function itShouldWorksFine() |
|
62 | { |
|
63 | $outputMessage = new PreCommitOutputWriter(GuardCoverageTool::CHECKING_MESSAGE); |
|
64 | $currentCoverage = 70.00; |
|
65 | $previousCoverage = 60.00; |
|
66 | ||
67 | $this->shouldProcessStrictCoverage($currentCoverage); |
|
68 | $this->shouldWriteOutput($outputMessage->getMessage()); |
|
69 | $this->shouldReadGuardCoverage($previousCoverage); |
|
70 | $this->shouldWriteLnOutput($outputMessage->getSuccessfulMessage()); |
|
71 | $this->shouldWriteGuardCoverage($currentCoverage); |
|
72 | ||
73 | $this->guardCoverageToolCommandHandler->handle( |
|
74 | new GuardCoverageCommand(HookQuestions::PHPUNIT_GUARD_COVERAGE_MESSAGE_DEFAULT) |
|
75 | ); |
|
76 | } |
|
77 | } |
|
78 |
@@ 62-73 (lines=12) @@ | ||
59 | /** |
|
60 | * @test |
|
61 | */ |
|
62 | public function itShouldWorksFine() |
|
63 | { |
|
64 | $minimumStrictCoverage = MinimumStrictCoverageStub::create(90.00); |
|
65 | $outputMessage = new PreCommitOutputWriter(StrictCoverageToolExecutor::EXECUTE_MESSAGE); |
|
66 | ||
67 | $this->shouldWriteOutput($outputMessage->getMessage()); |
|
68 | $this->shouldProcessStrictCoverage(91.00); |
|
69 | $this->shouldWriteLnOutput($outputMessage->getSuccessfulMessage()); |
|
70 | ||
71 | $command = new StrictCoverageCommand($minimumStrictCoverage->value(), $this->errorMessage); |
|
72 | $this->strictCoverageToolCommandHandler->handle($command); |
|
73 | } |
|
74 | } |
|
75 |