public function test_StaticCall() { $class = (new Class_())->setName('\\C'); $method = (new Method())->setName('qaz')->setClass($class)->setStatic(true)->setDocReturnType(Type::object_('\\X\\Y')); $prop = (new Property())->setName('$wsx')->setClass($class)->setStatic(true)->setType(Type::string_()); $const = (new ClassConst())->setName('EDC')->setClass($class); $cls = new Name\FullyQualified('C'); $id = new Identifier('q'); $expr = new Expr\StaticCall($cls, $id, []); $completions = $this->complete([$id, $expr], [$method], [$prop], [$const]); $this->assertCount(3, $completions); $this->assertSame('qaz', $completions[0]->getInsertion()); $this->assertSame('qaz()', $completions[0]->getDisplay()); $this->assertSame('static_method', $completions[0]->getKind()); $this->assertSame('Y', $completions[0]->getType()); $this->assertSame('EDC', $completions[1]->getInsertion()); $this->assertSame('EDC', $completions[1]->getDisplay()); $this->assertSame('class_const', $completions[1]->getKind()); $this->assertSame('$wsx', $completions[2]->getInsertion()); $this->assertSame('$wsx', $completions[2]->getDisplay()); $this->assertSame('static_property', $completions[2]->getKind()); $this->assertSame('string', $completions[2]->getType()); }