Download the PHP package circle33/laravel-bus-fluentable without Composer
On this page you can find all versions of the php package circle33/laravel-bus-fluentable. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download circle33/laravel-bus-fluentable
More information about circle33/laravel-bus-fluentable
Files in circle33/laravel-bus-fluentable
Package laravel-bus-fluentable
Short Description Make Laravel testing batched jobs more fluent.
License MIT
Informations about the package laravel-bus-fluentable
Laravel Bus Fluentable
When using Laravel, the current approach to testing batched jobs, as shown below, is somewhat unconventional:
This package introduces some helper functions to enhance the testability of batched jobs. Inspired by fluent JSON testing, these methods provide a more streamlined and readable approach to testing job batches within the Laravel application. The goal is to improve developer experience by offering clear, concise methods with illustrative examples.
Installation
Documentation
has
Assert that the batch contains a job of the given type. You can also pass an integer to assert that the batch contains the exact number of jobs.
Example:
missing
Assert that the batch does not contain a job of the given type.
Example:
hasAll
Assert that the batch contains all of the given jobs.
Example:
missingAll
Assert that the batch does not contain any of the given jobs.
Example:
hasAny
Assert that the batch contains any of the given jobs.
Example:
first
Assert that the first job in the batch matches the given callback.
Example:
nth
Assert that the nth job in the batch matches the given callback or type and parameters.
Example:
equal
Assert that the batch contains exactly the given jobs with the specified parameters.
Example:
etc
Assert that the batch has unexpected jobs beyond those checked.
Example:
Contributing
Thank you for considering contributing to this project! We welcome and appreciate your help.
- Fork the repository to your GitHub account.
- Clone your forked repository to your local machine:
git clone https://github.com/your-username/laravel-bus-fluentable.git
License
The MIT License (MIT). Please see License File for more information.