PhpGitHooks\Module\PhpMd\Tests\Behaviour\PhpMdToolCommandHandlerTest::itShouldWorksFine PHP Метод

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

public itShouldWorksFine ( )
    public function itShouldWorksFine()
    {
        $phpMdOptions = PhpMdOptionsStub::random();
        $errorMessage = HookQuestions::PRE_COMMIT_ERROR_MESSAGE_DEFAULT;
        $phpFiles = FilesCommittedStub::createOnlyPhpFiles();
        $outputMessage = new PreCommitOutputWriter(PhpMdTool::CHECKING_MESSAGE);
        $this->shouldWriteOutput($outputMessage->getMessage());
        foreach ($phpFiles as $phpFile) {
            $this->shouldProcessPhpMdTool($phpFile, $phpMdOptions->value(), null);
        }
        $this->shouldWriteLnOutput($outputMessage->getSuccessfulMessage());
        $command = new PhpMdToolCommand($phpFiles, $phpMdOptions->value(), $errorMessage);
        $this->phpMdToolCommandHandler->handle($command);
    }