BetterReflectionTest\NodeCompiler\CompileNodeToValueTest::testClassConstantResolutionSelfForMethod PHP Method

testClassConstantResolutionSelfForMethod() public method

    public function testClassConstantResolutionSelfForMethod()
    {
        $phpCode = '<?php
        class Foo {
            const BAR = "baz";
            public function method($param = self::BAR) {}
        }
        ';
        $reflector = new ClassReflector(new StringSourceLocator($phpCode));
        $classInfo = $reflector->reflect('Foo');
        $methodInfo = $classInfo->getMethod('method');
        $paramInfo = $methodInfo->getParameter('param');
        $this->assertSame('baz', $paramInfo->getDefaultValue());
    }