File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/Symfony/Component/Messenger/Tests/Command Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -214,15 +214,13 @@ public function testRunWithMemoryLimit()
214
214
$ receiver = $ this ->createMock (ReceiverInterface::class);
215
215
$ receiver ->method ('get ' )->willReturn ([$ envelope ]);
216
216
217
- $ receiverLocator = $ this ->createMock (ContainerInterface::class);
218
- $ receiverLocator ->method ('has ' )->with ('dummy-receiver ' )->willReturn (true );
219
- $ receiverLocator ->method ('get ' )->with ('dummy-receiver ' )->willReturn ($ receiver );
217
+ $ receiverLocator = new Container ();
218
+ $ receiverLocator ->set ('dummy-receiver ' , $ receiver );
220
219
221
220
$ bus = $ this ->createMock (MessageBusInterface::class);
222
221
223
- $ busLocator = $ this ->createMock (ContainerInterface::class);
224
- $ busLocator ->method ('has ' )->with ('dummy-bus ' )->willReturn (true );
225
- $ busLocator ->method ('get ' )->with ('dummy-bus ' )->willReturn ($ bus );
222
+ $ busLocator = new Container ();
223
+ $ busLocator ->set ('dummy-bus ' , $ bus );
226
224
227
225
$ logger = new class () implements LoggerInterface {
228
226
use LoggerTrait;
@@ -249,6 +247,7 @@ public function log(...$args): void
249
247
$ this ->assertStringContainsString ('The worker will automatically exit once it has exceeded 1.5M of memory ' , $ tester ->getDisplay ());
250
248
251
249
$ this ->assertSame (1572864 , $ logger ->logs [1 ][2 ]['limit ' ]);
250
+ }
252
251
253
252
public function testRunWithAllOption ()
254
253
{
You can’t perform that action at this time.
0 commit comments