Esempio n. 1
0
 public function testClear()
 {
     $this->assertTrue($this->driver->set('key1', 1));
     $this->assertTrue($this->driver->set('key2', 2));
     $this->assertTrue($this->driver->clear(), '->clear() should return true on success');
     $this->assertFalse($this->driver->has('key1'));
     $this->assertFalse($this->driver->has('key2'));
 }
Esempio n. 2
0
 /**
  * @inheritdoc
  */
 public function set($key, $value, $ttl = 0)
 {
     $value = $this->serializer->serialize($value);
     return $this->driver->set($key, $value, $ttl);
 }