project = new Project(new LanguageClient(new MockProtocolStream())); } public function testGetDocumentLoadsDocument() { $document = $this->project->getDocument(pathToUri(__FILE__)); $this->assertNotNull($document); $this->assertInstanceOf(PhpDocument::class, $document); } public function testGetDocumentReturnsOpenedInstance() { $document1 = $this->project->openDocument(pathToUri(__FILE__), file_get_contents(__FILE__)); $document2 = $this->project->getDocument(pathToUri(__FILE__)); $this->assertSame($document1, $document2); } }