When developing with Laravel, in some cases we just write everything around a default installation, to get features done as quickly as possible. In that case, everything needed for running PHPUnit is already set up after running.
A few ways to collect and and inspect your application data.
Testbench Component is a simple package that has been designed to help you write tests for your Laravel package, especially when there is routing involved.
This package allow you to inject DTO object mapped from the Request to the action.