public function StaticReflectionParserTest::testParentClass in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/doctrine/common/tests/Doctrine/Tests/Common/Reflection/StaticReflectionParserTest.php \Doctrine\Tests\Common\Reflection\StaticReflectionParserTest::testParentClass()
@dataProvider parentClassData
Parameters
bool $classAnnotationOptimize:
string $parsedClassName:
string $expectedClassName:
Return value
void
File
- vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Reflection/ StaticReflectionParserTest.php, line 20
Class
Namespace
Doctrine\Tests\Common\ReflectionCode
public function testParentClass($classAnnotationOptimize, $parsedClassName, $expectedClassName) {
// If classed annotation optimization is enabled the properties tested
// below cannot be found.
if ($classAnnotationOptimize) {
$this
->setExpectedException('ReflectionException');
}
$testsRoot = substr(__DIR__, 0, -strlen(__NAMESPACE__) - 1);
$paths = array(
'Doctrine\\Tests' => array(
$testsRoot,
),
);
$staticReflectionParser = new StaticReflectionParser($parsedClassName, new Psr0FindFile($paths), $classAnnotationOptimize);
$declaringClassName = $staticReflectionParser
->getStaticReflectionParserForDeclaringClass('property', 'test')
->getClassName();
$this
->assertEquals($expectedClassName, $declaringClassName);
}