getCachedVersion() public method

If so, return it otherwise return false.
public getCachedVersion ( string $key ) : boolean | SiteConfig
$key string Key for the cache
return boolean | SiteConfig
コード例 #1
0
ファイル: ConfigBuilderTest.php プロジェクト: harikt/graby
 /**
  * @dataProvider dataForCachedVersion
  */
 public function testCachedVersion($key, $cached)
 {
     $config = false;
     $configBuilder = new ConfigBuilder(array('site_config' => array(dirname(__FILE__))));
     if ($cached) {
         $config = $configBuilder->create();
         $config->body = array('//test');
         $configBuilder->addToCache($key, $config);
     }
     $this->assertEquals($config, $configBuilder->getCachedVersion($key));
 }