public function testDestroyMethod() { $memcache = $this->getMock('Memcached', ['delete']); $memcache->expects($this->once())->method('delete')->with($this->equalTo('foo')); $m = new \Cygnite\Cache\Storage\Memcached($memcache); $m->destroy('foo'); }
public function testDecrementMethod() { $this->memcached->store('foo', 10); $this->memcached->decrement('foo', 5); $this->assertEquals(5, $this->memcached->get('foo')); $memcache = $this->getMock('Memcached', ['decrement']); $memcache->expects($this->once())->method('decrement')->with($this->equalTo('foo'), $this->equalTo(15)); $memcached = new Cygnite\Cache\Storage\Memcached($memcache); $memcached->decrement('foo', 15); }