Skip to content

Commit 8826db2

Browse files
committed
minor symfony#54857 [Messenger] Fix missing import (alexandre-daubois)
This PR was merged into the 7.1 branch. Discussion ---------- [Messenger] Fix missing import | Q | A | ------------- | --- | Branch? | 7.1 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | - | License | MIT [Fixes CI](https://github.com/symfony/symfony/actions/runs/8980645540/job/24664656941#step:8:1304) Commits ------- 36a1636 [Messenger] Remove ContainerInterface mock
2 parents 9c9d571 + 36a1636 commit 8826db2

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -433,22 +433,13 @@ public function testStampsAddedByMiddlewaresDontDisappearWhenValidationFails()
433433
'transport1' => $transport1,
434434
];
435435

436-
$locator = $this->createMock(ContainerInterface::class);
437-
$locator->expects($this->any())
438-
->method('has')
439-
->willReturn(true);
440-
$locator->expects($this->any())
441-
->method('get')
442-
->willReturnCallback(fn ($transportName) => $transports[$transportName]);
436+
$locator = new Container();
437+
$locator->set('transport1', $transport1);
438+
443439
$senderLocator = new SendersLocator([], $locator);
444440

445-
$retryStrategyLocator = $this->createMock(ContainerInterface::class);
446-
$retryStrategyLocator->expects($this->any())
447-
->method('has')
448-
->willReturn(true);
449-
$retryStrategyLocator->expects($this->any())
450-
->method('get')
451-
->willReturn(new MultiplierRetryStrategy(1));
441+
$retryStrategyLocator = new Container();
442+
$retryStrategyLocator->set('transport1', new MultiplierRetryStrategy(1));
452443

453444
$violationList = new ConstraintViolationList([new ConstraintViolation('validation failed', null, [], null, null, null)]);
454445
$validator = $this->createMock(ValidatorInterface::class);

0 commit comments

Comments
 (0)