Skip to content

Commit abf769b

Browse files
minor #49663 [Tests] Remove withConsecutive() calls from tests (alexandre-daubois)
This PR was merged into the 6.3 branch. Discussion ---------- [Tests] Remove `withConsecutive()` calls from tests | Q | A | ------------- | --- | Branch? | 6.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | _NA_ | License | MIT | Doc PR | _NA_ Last one, introduced in 6.3 🙂 Commits ------- 65fc32e [Tests] Remove `withConsecutive()` calls from tests
2 parents b4d3766 + 65fc32e commit abf769b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/Symfony/Component/HttpKernel/Tests/Debug/ErrorHandlerConfiguratorTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,24 @@ public function testLevelsAssignedToLoggers(bool $hasLogger, bool $hasDeprecatio
4747
if ($hasDeprecationLogger) {
4848
$deprecationLogger = $this->createMock(LoggerInterface::class);
4949
if (null !== $expectedDeprecationLoggerLevels) {
50-
$expectedCalls[] = [$deprecationLogger, $expectedDeprecationLoggerLevels];
50+
$expectedCalls[] = [$deprecationLogger, $expectedDeprecationLoggerLevels, false];
5151
}
5252
}
5353

5454
if ($hasLogger) {
5555
$logger = $this->createMock(LoggerInterface::class);
5656
if (null !== $expectedLoggerLevels) {
57-
$expectedCalls[] = [$logger, $expectedLoggerLevels];
57+
$expectedCalls[] = [$logger, $expectedLoggerLevels, false];
5858
}
5959
}
6060

6161
$handler
6262
->expects($this->exactly(\count($expectedCalls)))
6363
->method('setDefaultLogger')
64-
->withConsecutive(...$expectedCalls);
64+
->willReturnCallback(function (...$args) use (&$expectedCalls) {
65+
$this->assertSame(array_shift($expectedCalls), $args);
66+
})
67+
;
6568

6669
$configurator = new ErrorHandlerConfigurator($logger, $levels, null, true, true, $deprecationLogger);
6770

0 commit comments

Comments
 (0)