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