Skip to content

Commit

Permalink
Mitigate PHPUnit deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandre-daubois committed Sep 8, 2024
1 parent 009d870 commit 259e525
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Tests/Messenger/DoctrineCloseConnectionMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public function testInvalidEntityManagerThrowsException()
$managerRegistry
->method('getManager')
->with('unknown_manager')
->will($this->throwException(new \InvalidArgumentException()));
->willThrowException(new \InvalidArgumentException());

$middleware = new DoctrineCloseConnectionMiddleware($managerRegistry, 'unknown_manager');

Expand Down
2 changes: 1 addition & 1 deletion Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public function testInvalidEntityManagerThrowsException()
$managerRegistry
->method('getManager')
->with('unknown_manager')
->will($this->throwException(new \InvalidArgumentException()));
->willThrowException(new \InvalidArgumentException());

$middleware = new DoctrinePingConnectionMiddleware($managerRegistry, 'unknown_manager');

Expand Down
2 changes: 1 addition & 1 deletion Tests/Messenger/DoctrineTransactionMiddlewareTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public function testInvalidEntityManagerThrowsException()
$managerRegistry
->method('getManager')
->with('unknown_manager')
->will($this->throwException(new \InvalidArgumentException()));
->willThrowException(new \InvalidArgumentException());

$middleware = new DoctrineTransactionMiddleware($managerRegistry, 'unknown_manager');

Expand Down

0 comments on commit 259e525

Please sign in to comment.