'true'), true), array(array('cache.enabled' => true), true), array(array(), false), array(null, false) ); } public static function CachePathProvider() { return array( array(array('cache.FileName' => 'temp.cache'), 'temp.cache'), array(array(), 'auth.cache'), array(null, 'auth.cache') ); } /** * * @dataProvider EnabledProvider */ public function testIsEnabled($config, $expected) { $result = AuthorizationCache::isEnabled($config); $this->assertEquals($expected, $result); } /** * @dataProvider CachePathProvider */ public function testCachePath($config, $expected) { $result = AuthorizationCache::cachePath($config); $this->assertContains($expected, $result); } }