Skip to content

Commit 1957999

Browse files
committed
minor #54785 Remove calls to TestCase::iniSet() and calls to deprecated methods of MockBuilder (alexandre-daubois)
This PR was merged into the 5.4 branch. Discussion ---------- Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder` | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT Last round (before new deprecations 🙂). All deprecations [listed here](https://github.com/sebastianbergmann/phpunit/blob/main/DEPRECATIONS.md) should be gone. Commits ------- 4d5065ddd9 Remove calls to `TestCase::iniSet()` and calls to deprecated methods of `MockBuilder`
2 parents 49c9c6d + 31d24e4 commit 1957999

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/Firewall/ContextListenerTest.php

+5-2
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,11 @@ public function testWithPreviousNotStartedSession()
366366

367367
public function testSessionIsNotReported()
368368
{
369-
$usageReporter = $this->getMockBuilder(\stdClass::class)->addMethods(['__invoke'])->getMock();
370-
$usageReporter->expects($this->never())->method('__invoke');
369+
$this->expectNotToPerformAssertions();
370+
371+
$usageReporter = static function (): void {
372+
throw new \LogicException('This should not be called');
373+
};
371374

372375
$session = new Session(new MockArraySessionStorage(), null, null, $usageReporter);
373376

0 commit comments

Comments
 (0)