public function testAncestor() { $snippet = $this->snippetFromMethod(Key::class, 'ancestor'); $snippet->addLocal('key', $this->key); $res = $snippet->invoke(); $this->assertEquals(['kind' => 'Person', 'name' => 'Jane'], $this->key->path()[0]); }