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

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

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