BetterReflectionTest\Reflection\ReflectionPropertyTest::testGetDocBlockTypes PHP Method

testGetDocBlockTypes() public method

public testGetDocBlockTypes ( string $propertyName, string[] $expectedTypes )
$propertyName string
$expectedTypes string[]
    public function testGetDocBlockTypes($propertyName, $expectedTypes)
    {
        $classInfo = $this->reflector->reflect('\\BetterReflectionTest\\Fixture\\ExampleClass');
        $foundTypes = $classInfo->getProperty($propertyName)->getDocBlockTypes();
        $this->assertCount(count($expectedTypes), $foundTypes);
        foreach ($expectedTypes as $i => $expectedType) {
            $this->assertInstanceOf($expectedType, $foundTypes[$i]);
        }
    }