/** * @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)); }
public function unserialize($data) { return parent::unserialize($data); }