$this->
assertTrue($factory->
supports('redis://localhost',
[]));
$this->
assertTrue($factory->
supports('rediss://localhost',
[]));
$this->
assertFalse($factory->
supports('sqs://localhost',
[]));
$this->
assertFalse($factory->
supports('invalid-dsn',
[]));
} /**
* @group integration
*/
public function testCreateTransport() { $this->
skipIfRedisUnavailable();
$factory =
new RedisTransportFactory();
$serializer =
$this->
createMock(SerializerInterface::
class);
$expectedTransport =
new RedisTransport(Connection::
fromDsn('redis://'.
getenv('REDIS_HOST'
),
['stream' => 'bar', 'delete_after_ack' => true
]),
$serializer);
$this->
assertEquals($expectedTransport,
$factory->
createTransport('redis://'.
getenv('REDIS_HOST'
),
['stream' => 'bar', 'delete_after_ack' => true
],
$serializer));
} private function skipIfRedisUnavailable() { try { (