From 31d24e4475ae8a2cf1d4d7cbac51621384ad21c5 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Mon, 29 Apr 2024 16:31:15 +0200 Subject: [PATCH] Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder` --- Tests/Firewall/ContextListenerTest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tests/Firewall/ContextListenerTest.php b/Tests/Firewall/ContextListenerTest.php index 4d748592..5389e54a 100644 --- a/Tests/Firewall/ContextListenerTest.php +++ b/Tests/Firewall/ContextListenerTest.php @@ -366,8 +366,11 @@ public function testWithPreviousNotStartedSession() public function testSessionIsNotReported() { - $usageReporter = $this->getMockBuilder(\stdClass::class)->addMethods(['__invoke'])->getMock(); - $usageReporter->expects($this->never())->method('__invoke'); + $this->expectNotToPerformAssertions(); + + $usageReporter = static function (): void { + throw new \LogicException('This should not be called'); + }; $session = new Session(new MockArraySessionStorage(), null, null, $usageReporter);