This is a sample project I used to demostrate how to mock and test PHP Traits. The blog post can be found here
Clone the repostory.
Run composer install
composer install
Create a .env
file from .env.example
Generate your app key
php artisan key:generate
Create a database and update your .env
database credentials.
Run the test
vendor/bin/phpunit --filter=CustomResponseTest