spec\GrumPHP\Task\YamlLintSpec::it_throws_exception_if_the_process_fails PHP Метод

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

public it_throws_exception_if_the_process_fails ( YamlLinter $linter, GrumPHP\Task\Context\ContextInterface $context )
$linter GrumPHP\Linter\Yaml\YamlLinter
$context GrumPHP\Task\Context\ContextInterface
    function it_throws_exception_if_the_process_fails(YamlLinter $linter, ContextInterface $context)
    {
        $linter->isInstalled()->willReturn(true);
        $linter->setObjectSupport(false)->shouldBeCalled();
        $linter->setExceptionOnInvalidType(false)->shouldBeCalled();
        $linter->lint(Argument::type('SplFileInfo'))->willReturn(new LintErrorsCollection([new YamlLintError(LintError::TYPE_ERROR, 0, 'error', 'file.yaml', 1, 1)]));
        $context->getFiles()->willReturn(new FilesCollection([new SplFileInfo('file.yaml', '.', 'file.yaml')]));
        $result = $this->run($context);
        $result->shouldBeAnInstanceOf(TaskResultInterface::class);
        $result->isPassed()->shouldBe(false);
    }