Skip to content

Commit a0464e7

Browse files
alexandre-dauboisnicolas-grekas
authored andcommitted
[Tests] Remove occurrences of withConsecutive()
1 parent 2ab1b77 commit a0464e7

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

Tests/Config/ContainerParametersResourceCheckerTest.php

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,17 @@ public static function isFreshProvider()
6464
yield 'fresh on every identical parameters' => [function (MockObject $container) {
6565
$container->expects(self::exactly(2))->method('hasParameter')->willReturn(true);
6666
$container->expects(self::exactly(2))->method('getParameter')
67-
->withConsecutive(
68-
[self::equalTo('locales')],
69-
[self::equalTo('default_locale')]
70-
)
71-
->willReturnMap([
72-
['locales', ['fr', 'en']],
73-
['default_locale', 'fr'],
74-
])
67+
->willReturnCallback(function (...$args) {
68+
static $series = [
69+
[['locales'], ['fr', 'en']],
70+
[['default_locale'], 'fr'],
71+
];
72+
73+
[$expectedArgs, $return] = array_shift($series);
74+
self::assertSame($expectedArgs, $args);
75+
76+
return $return;
77+
})
7578
;
7679
}, true];
7780
}

0 commit comments

Comments
 (0)