public function testGetReturnTypeWithDeclaredType($functionToReflect, $expectedType)
{
$reflector = new FunctionReflector(new SingleFileSourceLocator(__DIR__ . '/../Fixture/Php7ReturnTypeDeclarations.php'));
$functionInfo = $reflector->reflect($functionToReflect);
$reflectionType = $functionInfo->getReturnType();
$this->assertInstanceOf(ReflectionType::class, $reflectionType);
$this->assertSame($expectedType, (string) $reflectionType);
}