public static function get($key)
{
return self::getInstance()->{$key};
}
/** * Tests saving data. */ public function testSaveData() { $object = $this->saveObject(); $this->assertSame($object, $this->cache->get(self::CACHE_KEY)); // Saving using one way ObjectCache::set(self::CACHE_KEY, $object); $this->assertSame($object, $this->cache->get(self::CACHE_KEY)); // Saving using the other way $this->cache->{self::CACHE_KEY} = $object; $this->assertSame($object, $this->cache->get(self::CACHE_KEY)); $this->cache->clear(); }