loader = new PhpDocumentLoader( new FileSystemContentRetriever, $projectIndex, new DefinitionResolver($projectIndex) ); } public function testGetOrLoadLoadsDocument() { $document = $this->loader->getOrLoad(pathToUri(__FILE__))->wait(); $this->assertNotNull($document); $this->assertInstanceOf(PhpDocument::class, $document); } public function testGetReturnsOpenedInstance() { $document1 = $this->loader->open(pathToUri(__FILE__), file_get_contents(__FILE__)); $document2 = $this->loader->get(pathToUri(__FILE__)); $this->assertSame($document1, $document2); } }