Example #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");
 }
Example #2
0
 public function testRemove()
 {
     $cacheId = 'test';
     $this->_collection->expects($this->once())->method('remove')->with(['_id' => $cacheId])->will($this->returnValue(true));
     $this->assertTrue($this->_model->remove($cacheId));
 }