GrumPHP\Linter\Json\JsonLinter::isInstalled PHP Method

isInstalled() public method

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

Usage Example

Esempio n. 1
0
 function it_throws_exception_if_the_process_fails(JsonLinter $linter, ContextInterface $context)
 {
     $linter->isInstalled()->willReturn(true);
     $linter->setDetectKeyConflicts(false)->shouldBeCalled();
     $linter->lint(Argument::type('SplFileInfo'))->willReturn(new LintErrorsCollection(array(new JsonLintError(LintError::TYPE_ERROR, 0, 'error', 'file.json', 1, 1))));
     $context->getFiles()->willReturn(new FilesCollection(array(new SplFileInfo('file.json', '.', 'file.json'))));
     $this->shouldThrow('GrumPHP\\Exception\\RuntimeException')->duringRun($context);
 }
All Usage Examples Of GrumPHP\Linter\Json\JsonLinter::isInstalled