PayPal\Cache\AuthorizationCache::isEnabled PHP Method

isEnabled() public static method

Determines from the Configuration if caching is currently enabled/disabled
public static isEnabled ( $config ) : boolean
$config
return boolean
    public static function isEnabled($config)
    {
        $value = self::getConfigValue('cache.enabled', $config);
        return empty($value) ? false : trim($value) == true || trim($value) == 'true';
    }

Usage Example

 /**
  *
  * @dataProvider EnabledProvider
  */
 public function testIsEnabled($config, $expected)
 {
     $result = AuthorizationCache::isEnabled($config);
     $this->assertEquals($expected, $result);
 }