Ejemplo n.º 1
0
 public function testRemove()
 {
     $cacheId = 'test';
     $this->_model->save('test data', $cacheId);
     $this->assertGreaterThan(0, $this->_model->test($cacheId), "Cache with id '{$cacheId}' has not been found");
     $this->_model->remove($cacheId);
     $this->assertFalse($this->_model->test($cacheId), "Cache with id '{$cacheId}' has not been removed");
 }
Ejemplo n.º 2
0
 public function testTestNotFound()
 {
     $this->_collection->expects($this->once())->method('findOne')->will($this->returnValue(null));
     $this->assertFalse($this->_model->test('test_id'));
 }