Log Fake for Laravel

Log Fake is a drop-in fake logger for testing with the Laravel framework by Tim MacDonald (@timacdonald). The Log fake package gives you the ability to fake the logger in your application, including the ability to make assertions against channels and stacks introduced in Laravel 5.6. Heres a simple example of using the logger in a test: As mentioned, this fake supports channels and stacks, so if you are logging to a specific channel in your app, you need to prefix your assertions with a given channel: Like channels, you will need to do the same thing for stacks: The GitHub repo has a full list of available assertions and usage instructions, along with the source code.

Read Full Article at https://laravel-news.com/log-fake