Skip to content

Commit 842c594

Browse files
committed
fixed CS
1 parent 729edde commit 842c594

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Symfony/Component/Messenger/Tests/DataCollector/MessengerDataCollectorTest.php

+1-1
Original file line numberDiff line numberDiff 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();

src/Symfony/Component/Messenger/Tests/Middleware/AllowNoHandlerMiddlewareTest.php

+2-2
Original file line numberDiff line numberDiff 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);

src/Symfony/Component/Messenger/Tests/TraceableMessageBusTest.php

+1-1
Original file line numberDiff line numberDiff 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 = new \RuntimeException('Meh.'));
6363

6464
$traceableBus = new TraceableMessageBus($bus);
6565

0 commit comments

Comments
 (0)