Skip to content

Commit

Permalink
[Tests] Remove occurrences of withConsecutive()
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois authored and nicolas-grekas committed Mar 10, 2023
1 parent 783ee4c commit 5ea6266
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Tests/Event/FailedMessageEventTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,18 @@ public function __toString(): string

$message = new DummyMessage();

$series = [
new MessageEvent($message),
new FailedMessageEvent($message, $transport->exception),
];

$eventDispatcherMock->expects($this->exactly(2))
->method('dispatch')
->withConsecutive(
[new MessageEvent($message)],
[new FailedMessageEvent($message, $transport->exception)]
);
->willReturnCallback(function (object $event) use (&$series) {
$this->assertEquals(array_shift($series), $event);

return $event;
});
try {
$transport->send($message);
} catch (NullTransportException $exception) {
Expand Down

0 comments on commit 5ea6266

Please sign in to comment.