コード例 #1
0
ファイル: ResourceTest.php プロジェクト: r-kovalenko/Rediska
 /**
  * @group resource
  * @group auto_serialize
  */
 public function testNewInstanceWithAutoSerialization()
 {
     $application = new Zend_Application('tests', dirname(__FILE__) . '/application5.ini');
     /* @var Zend_Cache_Manager $manager */
     $manager = $application->bootstrap()->getBootstrap()->getResource('cachemanager');
     $manager->getCache('test')->save('321', 'test');
     $options = $manager->getCache('test')->getBackend()->getOption('storage');
     $rediska = new Rediska(array('redisVersion' => '2.0', 'addToManager' => false));
     $one = $rediska->getHashValues($options['prefix_key'] . 'test');
     $this->assertEquals('321', $one[0]);
     $this->assertEquals(array(), Rediska_Manager::getAll());
 }