Add event fake documentation for times dispatched

This commit is contained in:
Eimantas Kateiva 2018-02-07 21:34:53 +02:00
parent bb89843dcc
commit 1878c502c1
1 changed files with 4 additions and 0 deletions

View File

@ -79,6 +79,10 @@ As an alternative to mocking, you may use the `Event` facade's `fake` method to
return $e->order->id === $order->id;
});
// Assert an event was dispatched twice...
Event::assertDispatched(OrderShipped::class, 2);
// Assert an event was not dispatched...
Event::assertNotDispatched(OrderFailedToShip::class);
}
}