Laravel 文件已經將 event listener 如何測試加上:
If you would simply like to assert that an event listener is listening to a given event, you may use the
assertListening
method:
Event::assertListening(
OrderShipped::class,
SendShipmentNotification::class
);