BetterReflectionTest\Reflection\ReflectionParameterTest::testPhp7TypeDeclarationWithStringTypeThatAllowsNull PHP Метод

testPhp7TypeDeclarationWithStringTypeThatAllowsNull() публичный Метод

    public function testPhp7TypeDeclarationWithStringTypeThatAllowsNull()
    {
        $classInfo = $this->reflector->reflect(Php7ParameterTypeDeclarations::class);
        $method = $classInfo->getMethod('foo');
        $stringParamType = $method->getParameter('stringParamAllowsNull')->getType();
        $this->assertSame('string', (string) $stringParamType);
        $this->assertTrue($stringParamType->isBuiltin());
        $this->assertTrue($stringParamType->allowsNull());
    }