public function testPathEnd()
{
$snippet = $this->snippetFromMethod(Key::class, 'pathEnd');
$snippet->addLocal('key', $this->key);
$this->key->pathElement('Foo', 'Bar');
$this->key->pathElement('Foo', 'Baz');
$res = $snippet->invoke('lastPathElement');
$this->assertEquals(['kind' => 'Foo', 'name' => 'Baz'], $res->returnVal());
}