protected function getMockCache($path = null, $flushResult = true) { $cache = parent::getMockCache($path); $cache->expects($this->once())->method('flushAll')->will($this->returnValue($flushResult)); return $cache; }