Skip to content

Commit

Permalink
minor #54857 [Messenger] Fix missing import (alexandre-daubois)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed May 7, 2024
2 parents 9c9d571 + 36a1636 commit 8826db2
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions src/Symfony/Component/Messenger/Tests/FailureIntegrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,22 +433,13 @@ public function testStampsAddedByMiddlewaresDontDisappearWhenValidationFails()
'transport1' => $transport1,
];

$locator = $this->createMock(ContainerInterface::class);
$locator->expects($this->any())
->method('has')
->willReturn(true);
$locator->expects($this->any())
->method('get')
->willReturnCallback(fn ($transportName) => $transports[$transportName]);
$locator = new Container();
$locator->set('transport1', $transport1);

$senderLocator = new SendersLocator([], $locator);

$retryStrategyLocator = $this->createMock(ContainerInterface::class);
$retryStrategyLocator->expects($this->any())
->method('has')
->willReturn(true);
$retryStrategyLocator->expects($this->any())
->method('get')
->willReturn(new MultiplierRetryStrategy(1));
$retryStrategyLocator = new Container();
$retryStrategyLocator->set('transport1', new MultiplierRetryStrategy(1));

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

0 comments on commit 8826db2

Please sign in to comment.