예제 #1
0
 /**
  * @dataProvider dataReadWrite
  */
 public function testRead($key, $data)
 {
     $mock = $this->getObject(null);
     $mock->expects($this->once())->method('prepareKey')->willReturn($key);
     $cacheBackend = new CacheBackend(new CacheFrontend(array('lifetime' => 86400)));
     $cacheBackend->save($key, $data, 86400);
     $mock->expects($this->once())->method('getCacheBackend')->willReturn($cacheBackend);
     $this->assertEquals($data, $mock->read($key));
 }
예제 #2
0
 public function unserialize($data)
 {
     return parent::unserialize($data);
 }