diff --git a/Tests/Messenger/DoctrineCloseConnectionMiddlewareTest.php b/Tests/Messenger/DoctrineCloseConnectionMiddlewareTest.php index ef5564ec..44d7af2c 100644 --- a/Tests/Messenger/DoctrineCloseConnectionMiddlewareTest.php +++ b/Tests/Messenger/DoctrineCloseConnectionMiddlewareTest.php @@ -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'); diff --git a/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php b/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php index a478f722..109f7b65 100644 --- a/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php +++ b/Tests/Messenger/DoctrinePingConnectionMiddlewareTest.php @@ -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'); diff --git a/Tests/Messenger/DoctrineTransactionMiddlewareTest.php b/Tests/Messenger/DoctrineTransactionMiddlewareTest.php index 91094173..7329721a 100644 --- a/Tests/Messenger/DoctrineTransactionMiddlewareTest.php +++ b/Tests/Messenger/DoctrineTransactionMiddlewareTest.php @@ -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');