Beispiel #1
0
 public function testBasicCrudOperations()
 {
     $this->assertFalse($this->driver->has('key'));
     // Test saving a value, checking if it exists, and fetching it back
     $this->assertTrue($this->driver->set('key', 'foo'), '->set() should return true on success');
     $this->assertTrue($this->driver->has('key'));
     $this->assertEquals('foo', $this->driver->get('key'));
     // Test updating the value of a cache entry
     $this->assertTrue($this->driver->set('key', 'value-changed'), '->set() should return true on success');
     $this->assertTrue($this->driver->has('key'));
     $this->assertEquals('value-changed', $this->driver->get('key'));
     // Test removing a value
     $this->assertTrue($this->driver->remove('key'), '->remove() should return true on success');
     $this->assertFalse($this->driver->has('key'));
 }
Beispiel #2
0
 /**
  * @inheritdoc
  */
 public function remove($key)
 {
     return $this->driver->remove($key);
 }