File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
src/Symfony/Component/Messenger/Tests Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ public function testHandleWithException()
117117 $ message = new DummyMessage ('dummy message ' );
118118
119119 $ bus = $ this ->getMockBuilder (MessageBusInterface::class)->getMock ();
120- $ bus ->method ('dispatch ' )->with ($ message )->will ( $ this -> throwException ( new \RuntimeException ('foo ' ) ));
120+ $ bus ->method ('dispatch ' )->with ($ message )->willThrowException ( new \RuntimeException ('foo ' ));
121121 $ bus = new TraceableMessageBus ($ bus );
122122
123123 $ collector = new MessengerDataCollector ();
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function testItCallsNextMiddlewareAndReturnsItsResult()
3232 public function testItCatchesTheNoHandlerException ()
3333 {
3434 $ next = $ this ->createPartialMock (\stdClass::class, array ('__invoke ' ));
35- $ next ->expects ($ this ->once ())->method ('__invoke ' )->will ( $ this -> throwException ( new NoHandlerForMessageException () ));
35+ $ next ->expects ($ this ->once ())->method ('__invoke ' )->willThrowException ( new NoHandlerForMessageException ());
3636
3737 $ middleware = new AllowNoHandlerMiddleware ();
3838
@@ -46,7 +46,7 @@ public function testItCatchesTheNoHandlerException()
4646 public function testItDoesNotCatchOtherExceptions ()
4747 {
4848 $ next = $ this ->createPartialMock (\stdClass::class, array ('__invoke ' ));
49- $ next ->expects ($ this ->once ())->method ('__invoke ' )->will ( $ this -> throwException ( new \RuntimeException ('Something went wrong. ' ) ));
49+ $ next ->expects ($ this ->once ())->method ('__invoke ' )->willThrowException ( new \RuntimeException ('Something went wrong. ' ));
5050
5151 $ middleware = new AllowNoHandlerMiddleware ();
5252 $ middleware ->handle (new DummyMessage ('Hey ' ), $ next );
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public function testItTracesExceptions()
5959 $ message = new DummyMessage ('Hello ' );
6060
6161 $ bus = $ this ->getMockBuilder (MessageBusInterface::class)->getMock ();
62- $ bus ->expects ($ this ->once ())->method ('dispatch ' )->with ($ message )->will ( $ this -> throwException ( $ exception = new \RuntimeException ('Meh. ' ) ));
62+ $ bus ->expects ($ this ->once ())->method ('dispatch ' )->with ($ message )->willThrowException ( $ exception =
488C
new \RuntimeException ('Meh. ' ));
6363
6464 $ traceableBus = new TraceableMessageBus ($ bus );
6565
You can’t perform that action at this time.
0 commit comments