Phive\Queue\Tests\Queue\RedisQueueTest::testThrowExceptionOnErrorResponse PHP Method

testThrowExceptionOnErrorResponse() public method

    public function testThrowExceptionOnErrorResponse($method)
    {
        $mock = $this->getMock('Redis');
        $redisMethods = get_class_methods('Redis');
        foreach ($redisMethods as $redisMethod) {
            $mock->expects($this->any())->method($redisMethod)->will($this->returnValue(false));
        }
        $queue = new RedisQueue($mock);
        try {
            $this->callQueueMethod($queue, $method);
        } catch (NoItemAvailableException $e) {
        } catch (QueueException $e) {
            return;
        }
        $this->fail();
    }