Skip to content

Commit 8562a1d

Browse files
Merge branch '5.4' into 6.2
* 5.4: [Tests] Remove occurrences of `withConsecutive()` Fix support binary values in parameters. [Dotenv] Improve Dotenv::usePutenv phpdoc
2 parents 507b3a2 + c63f733 commit 8562a1d

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)