$transportA =
new DummyTransport('a'
);
$transportB =
new DummyTransport('b'
);
yield 'simple transport' =>
[ 'dummy://a',
$transportA,
];
yield 'failover transport' =>
[ 'failover(dummy://a dummy://b)',
new FailoverTransport([$transportA,
$transportB]),
];
yield 'round robin transport' =>
[ 'roundrobin(dummy://a dummy://b)',
new RoundRobinTransport([$transportA,
$transportB]),
];
yield 'mixed transport' =>
[ 'roundrobin(dummy://a failover(dummy://b dummy://a) dummy://b)',
new RoundRobinTransport([$transportA,
new FailoverTransport([$transportB,
$transportA]),
$transportB]),
];
}