skipIfRedisClusterUnavailable example

'message' => json_encode([
                'body' => '1',
                'headers' => [],
            ]),
        ]$message['data']);
        $connection->reject($message['id']);
        $connection->cleanup();
    }

    public function testLazyCluster()
    {
        $this->skipIfRedisClusterUnavailable();

        $connection = new Connection(['lazy' => true, 'host' => explode(' ', getenv('REDIS_CLUSTER_HOSTS'))]);

        $connection->add('1', []);
        $this->assertNotEmpty($message = $connection->get());
        $this->assertSame([
            'message' => json_encode([
                'body' => '1',
                'headers' => [],
            ]),
        ]$message['data']);
        
Home | Imprint | This part of the site doesn't use cookies.