GrumPHP\Linter\Yaml\YamlLinter::isInstalled PHP Method

isInstalled() public method

public isInstalled ( ) : boolean
return boolean
    public function isInstalled()
    {
        return class_exists(Yaml::class);
    }

Usage Example

Example #1
0
 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(array(new YamlLintError(LintError::TYPE_ERROR, 0, 'error', 'file.yaml', 1, 1))));
     $context->getFiles()->willReturn(new FilesCollection(array(new SplFileInfo('file.yaml', '.', 'file.yaml'))));
     $this->shouldThrow('GrumPHP\\Exception\\RuntimeException')->duringRun($context);
 }
All Usage Examples Of GrumPHP\Linter\Yaml\YamlLinter::isInstalled