$redeliveryStamp,
$errorStamp,
]);
$receiver =
$this->
createMock(ListableReceiverInterface::
class);
$receiver->
expects($this->
once())->
method('find'
)->
with(15
)->
willReturn($envelope);
$failureTransportName = 'failure_receiver';
$serviceLocator =
$this->
createMock(ServiceLocator::
class);
$serviceLocator->
method('has'
)->
with($failureTransportName)->
willReturn(true
);
$serviceLocator->
method('get'
)->
with($failureTransportName)->
willReturn($receiver);
$command =
new FailedMessagesShowCommand( $failureTransportName,
$serviceLocator );
$tester =
new CommandTester($command);
$tester->
execute(['id' => 15
]);
$this->
assertStringContainsString(sprintf(<<<EOF
------------- ---------------------
Class stdClass
Message Id 15
Failed at %s
Error Things are bad!
Error Code 123
Error Class Exception
Transport async