hatchetaustralia / laravel-schedule-testing

A lightweight package for testing Laravel schedules.
https://hatchetaustralia.github.io/laravel-schedule-testing/
Other
1 stars 0 forks source link
command console laravel schedule scheduling testing

Hatchet's Laravel Schedule Testing

Build Status Total Downloads Latest Stable Version License

## About Laravel Schedule Testing [Laravel Schedule Testing](https://hatchetaustralia.github.io/laravel-schedule-testing/) was created and is maintained by the developers at [Hatchet](https://hatchet.com.au) and is a lightweight package for testing your scheduled commands in Laravel. ## Installation >Minimum requirement of PHP 8.0 and Laravel 9 Require Laravel Schedule Testing via [Composer](https://getcomposer.org/): ```php composer require hatchetaustralia/laravel-schedule-testing --dev ``` ## Usage ```php class HourlyReportCommandTest extends TestCase { // Add the `InteractsWithSchedule` trait to your class use InteractsWithSchedule; public function testCommandRunsOnTheHour() { // Then, get started with using the `assertSchedule` method. $this->assertSchedule('reports:send-report') ->isScheduledToRunAt(now()->startOfHour()); } } ``` ## Assertions Check out our [documentation](https://hatchetaustralia.github.io/laravel-schedule-testing/) for further information on what assertions are available. ## Contributing Thank you for considering to contribute to Laravel Schedule Testing. All the contribution guidelines are mentioned [here](CONTRIBUTING.md). You can have a look at the [CHANGELOG](CHANGELOG.md) for constant updates & detailed information about the changes. ## License Laravel Schedule Testing is an open-sourced software licensed under the [Do Not Harm License](LICENSE.md).