Skip to content

Commit a4fbe7b

Browse files
committed
do not mock the RequestStack class
1 parent 958ec0b commit a4fbe7b

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Tests/Console/ApplicationTest.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,6 @@ private function getKernel(array $bundles, $useDispatcher = false)
243243
{
244244
$container = $this->createMock(ContainerInterface::class);
245245

246-
$requestStack = $this->createMock(RequestStack::class);
247-
$requestStack->expects($this->any())
248-
->method('push')
249-
;
250-
251246
if ($useDispatcher) {
252247
$dispatcher = $this->createMock(EventDispatcherInterface::class);
253248
$dispatcher
@@ -258,7 +253,7 @@ private function getKernel(array $bundles, $useDispatcher = false)
258253
$container->expects($this->atLeastOnce())
259254
->method('get')
260255
->willReturnMap([
261-
['.virtual_request_stack', 2, $requestStack],
256+
['.virtual_request_stack', 2, new RequestStack()],
262257
['event_dispatcher', 1, $dispatcher],
263258
])
264259
;

0 commit comments

Comments
 (0)