Skip to content

Commit

Permalink
minor #54785 Remove calls to TestCase::iniSet() and calls to deprec…
Browse files Browse the repository at this point in the history
…ated 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`
  • Loading branch information
xabbuh committed May 15, 2024
2 parents 49c9c6d + 31d24e4 commit 1957999
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Tests/Firewall/ContextListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 1957999

Please sign in to comment.