Phan\Tests\AnalyzerTest::testMethodInCodeBase PHP Method

testMethodInCodeBase() public method

    public function testMethodInCodeBase()
    {
        $context = $this->contextForCode("\n                namespace A;\n                Class B {\n                    public function c() {\n                        return 42;\n                    }\n                }\n            ");
        $class_fqsen = FullyQualifiedClassName::fromFullyQualifiedString('\\A\\B');
        self::assertTrue($this->code_base->hasClassWithFQSEN($class_fqsen), "Class with FQSEN {$class_fqsen} not found");
        $clazz = $this->code_base->getClassByFQSEN($class_fqsen);
        self::assertTrue($clazz->hasMethodWithName($this->code_base, 'c'), "Method with FQSEN not found");
    }