protected function registerPredisClient() { $this->predisClient = $this->getMock('\\Predis\\Client'); $this->container->expects($this->once())->method('get')->will($this->returnValue($this->predisClient)); }