->
willReturn(true
);
$retryStrategyLocator->
expects($this->
any()) ->
method('get'
) ->
willReturn(new MultiplierRetryStrategy(1
));
// using to so we can lazily get the bus later and avoid circular problem
$transport1HandlerThatFails =
new DummyTestHandler(true
);
$allTransportHandlerThatWorks =
new DummyTestHandler(false
);
$transport2HandlerThatWorks =
new DummyTestHandler(false
);
$handlerLocator =
new HandlersLocator([ DummyMessage::
class => [ new HandlerDescriptor($transport1HandlerThatFails,
[ 'from_transport' => 'transport1',
'alias' => 'handler_that_fails',
]),
new HandlerDescriptor($allTransportHandlerThatWorks,
[ 'alias' => 'handler_that_works1',
]),
new HandlerDescriptor($transport2HandlerThatWorks,
[ 'from_transport' => 'transport2',
'alias' => 'handler_that_works2',
]),
],
]);