Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d69f345

Browse files
committed
minor #60800 [Messenger] fix test (xabbuh)
This PR was merged into the 7.4 branch. Discussion ---------- [Messenger] fix test | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- 8eb6b82 fix test
2 parents 82f47f2 + 8eb6b82 commit d69f345

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Symfony/Component/Messenger/Tests/Command/ConsumeMessagesCommandTest.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ public function log(...$args): void
255255
$command = new ConsumeMessagesCommand(new RoutableMessageBus($busLocator), $receiverLocator, new EventDispatcher(), $logger);
256256

257257
$application = new Application();
258-
$application->add($command);
258+
if (method_exists($application, 'addCommand')) {
259+
$application->addCommand($command);
260+
} else {
261+
$application->add($command);
262+
}
259263
$tester = new CommandTester($application->get('messenger:consume'));
260264
$tester->execute([
261265
'receivers' => ['dummy-receiver'],

0 commit comments

Comments
 (0)