public function it_can_brpoplpush() { $this->client->brpoplpush('test', 'test', 0)->shouldBeCalled()->willReturn('test'); $result = $this->bRPopLPush('test', 'test', 0); \PHPUnit_Framework_Assert::assertEquals('test', $result->getWrappedObject()); $this->client->brpoplpush('test', 'test', 0)->willThrow($this->predisException); $this->shouldThrow(DriverException::class)->during('bRPopLPush', ['test', 'test', 0]); }