PhpGitHooks\Module\PhpUnit\Tests\Behaviour\PhpUnitToolCommandHandlerTest::itShouldThrowsException PHP Method

itShouldThrowsException() public method

    public function itShouldThrowsException()
    {
        $this->expectException(PhpUnitViolationException::class);
        $options = '--testsuite default';
        $errorMessage = HookQuestions::PRE_COMMIT_ERROR_MESSAGE_DEFAULT;
        $outputMessage = new PreCommitOutputWriter(PhpUnitToolExecutor::EXECUTING_MESSAGE);
        $this->shouldWriteLnOutput($outputMessage->getMessage());
        $this->shouldProcessPhpUnit($options, false);
        $this->shouldWriteLnOutput(BadJobLogoResponse::paint($errorMessage));
        $this->phpUnitToolCommandHandler->handle(new PhpUnitToolCommand(true, $options, $errorMessage));
    }