PHP Testbench is a set of common testing utilities we use at Craftzing across all of our PHP projects.
- Immutable object factories with an API similar to Laravel's Eloquent Factories.
- Custom PHPUnit constraints.
- Extended PHPUnit constraints for Laravel.
- Common test doubles.
This package requires:
- PHP 8.4 or 8.5
Depending on which features you want to use, other dependencies (marked as suggestions during composer install) may be required. Compatibility for each of dependency versions are highlighted in the according docs for those features.
Important
This package is not distributed through a package registry and has to be installed from the source repository. Make sure to add the following configuration to your composer.json:
"repositories": [
{
"type": "vcs",
"url": "https://github.com/craftzing/php-testbench.git"
}
],You can install this package using Composer by running the following command:
composer require craftzing/php-testbench --devCheck out our Change log for information on what has changed recently.
Have an idea for a feature? Wanna improve the docs? Found a bug? Check out our Contributing guide.
If you discover any security-related issues, please email security@craftzing.com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.

