fixed CS
This commit is contained in:
parent
729edde312
commit
842c5943dc
@ -117,7 +117,7 @@ DUMP
|
|||||||
$message = new DummyMessage('dummy message');
|
$message = new DummyMessage('dummy message');
|
||||||
|
|
||||||
$bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
|
$bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
|
||||||
$bus->method('dispatch')->with($message)->will($this->throwException(new \RuntimeException('foo')));
|
$bus->method('dispatch')->with($message)->willThrowException(new \RuntimeException('foo'));
|
||||||
$bus = new TraceableMessageBus($bus);
|
$bus = new TraceableMessageBus($bus);
|
||||||
|
|
||||||
$collector = new MessengerDataCollector();
|
$collector = new MessengerDataCollector();
|
||||||
|
@ -32,7 +32,7 @@ class AllowNoHandlerMiddlewareTest extends TestCase
|
|||||||
public function testItCatchesTheNoHandlerException()
|
public function testItCatchesTheNoHandlerException()
|
||||||
{
|
{
|
||||||
$next = $this->createPartialMock(\stdClass::class, array('__invoke'));
|
$next = $this->createPartialMock(\stdClass::class, array('__invoke'));
|
||||||
$next->expects($this->once())->method('__invoke')->will($this->throwException(new NoHandlerForMessageException()));
|
$next->expects($this->once())->method('__invoke')->willThrowException(new NoHandlerForMessageException());
|
||||||
|
|
||||||
$middleware = new AllowNoHandlerMiddleware();
|
$middleware = new AllowNoHandlerMiddleware();
|
||||||
|
|
||||||
@ -46,7 +46,7 @@ class AllowNoHandlerMiddlewareTest extends TestCase
|
|||||||
public function testItDoesNotCatchOtherExceptions()
|
public function testItDoesNotCatchOtherExceptions()
|
||||||
{
|
{
|
||||||
$next = $this->createPartialMock(\stdClass::class, array('__invoke'));
|
$next = $this->createPartialMock(\stdClass::class, array('__invoke'));
|
||||||
$next->expects($this->once())->method('__invoke')->will($this->throwException(new \RuntimeException('Something went wrong.')));
|
$next->expects($this->once())->method('__invoke')->willThrowException(new \RuntimeException('Something went wrong.'));
|
||||||
|
|
||||||
$middleware = new AllowNoHandlerMiddleware();
|
$middleware = new AllowNoHandlerMiddleware();
|
||||||
$middleware->handle(new DummyMessage('Hey'), $next);
|
$middleware->handle(new DummyMessage('Hey'), $next);
|
||||||
|
@ -59,7 +59,7 @@ class TraceableMessageBusTest extends TestCase
|
|||||||
$message = new DummyMessage('Hello');
|
$message = new DummyMessage('Hello');
|
||||||
|
|
||||||
$bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
|
$bus = $this->getMockBuilder(MessageBusInterface::class)->getMock();
|
||||||
$bus->expects($this->once())->method('dispatch')->with($message)->will($this->throwException($exception = new \RuntimeException('Meh.')));
|
$bus->expects($this->once())->method('dispatch')->with($message)->willThrowException($exception = new \RuntimeException('Meh.'));
|
||||||
|
|
||||||
$traceableBus = new TraceableMessageBus($bus);
|
$traceableBus = new TraceableMessageBus($bus);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user