Skip to content

Commit 9d7018b

Browse files
alexandre-dauboisnicolas-grekas
authored andcommitted
[Tests] Remove occurrences of withConsecutive()
1 parent 3bb6ee5 commit 9d7018b

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Tests/Session/Storage/Handler/StrictSessionHandlerTest.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,18 @@ public function testReadWithValidateIdMismatch()
8484
{
8585
$handler = $this->createMock(\SessionHandlerInterface::class);
8686
$handler->expects($this->exactly(2))->method('read')
87-
->withConsecutive(['id1'], ['id2'])
88-
->will($this->onConsecutiveCalls('data1', 'data2'));
87+
->willReturnCallback(function (...$args) {
88+
static $series = [
89+
[['id1'], 'data1'],
90+
[['id2'], 'data2'],
91+
];
92+
93+
[$expectedArgs, $return] = array_shift($series);
94+
$this->assertSame($expectedArgs, $args);
95+
96+
return $return;
97+
})
98+
;
8999
$proxy = new StrictSessionHandler($handler);
90100

91101
$this->assertTrue($proxy->validateId('id1'));

0 commit comments

Comments
 (0)