public function writingOperationsThrowAnExceptionIfCacheIsFrozen($method) { $this->redis->expects($this->once())->method('exists')->with('Foo_Cache:frozen')->will($this->returnValue(true)); $this->backend->{$method}('foo', 'bar'); }