project = new Project(new LanguageClient(new MockProtocolStream())); } public function testParsesVariableVariables() { $document = $this->project->getDocument('whatever'); $document->updateContent("getSymbols(); $this->assertEquals([ [ 'name' => 'a', 'kind' => SymbolKind::VARIABLE, 'location' => [ 'uri' => 'whatever', 'range' => [ 'start' => [ 'line' => 1, 'character' => 0 ], 'end' => [ 'line' => 1, 'character' => 3 ] ] ], 'containerName' => null ], [ 'name' => 'bar', 'kind' => SymbolKind::VARIABLE, 'location' => [ 'uri' => 'whatever', 'range' => [ 'start' => [ 'line' => 2, 'character' => 0 ], 'end' => [ 'line' => 2, 'character' => 4 ] ] ], 'containerName' => null ] ], json_decode(json_encode($symbols), true)); } public function testGetNodeAtPosition() { $document = $this->project->getDocument('whatever'); $document->updateContent("getNodeAtPosition(new Position(1, 13)); $this->assertInstanceOf(Node\Name\FullyQualified::class, $node); $this->assertEquals('SomeClass', (string)$node); } }