diff --git a/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php b/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php index 4f91016ac..68db5f4cf 100644 --- a/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php +++ b/Tests/Session/Storage/Handler/StrictSessionHandlerTest.php @@ -84,8 +84,18 @@ public function testReadWithValidateIdMismatch() { $handler = $this->createMock(\SessionHandlerInterface::class); $handler->expects($this->exactly(2))->method('read') - ->withConsecutive(['id1'], ['id2']) - ->will($this->onConsecutiveCalls('data1', 'data2')); + ->willReturnCallback(function (...$args) { + static $series = [ + [['id1'], 'data1'], + [['id2'], 'data2'], + ]; + + [$expectedArgs, $return] = array_shift($series); + $this->assertSame($expectedArgs, $args); + + return $return; + }) + ; $proxy = new StrictSessionHandler($handler); $this->assertTrue($proxy->validateId('id1'));