What is Testbench?
11.xTestbench is a Laravel testing helper designed specifically for package development. It provides the necessary infrastructure to write tests for Laravel packages by simulating a Laravel environment within your test suite.
repository·11.x·Indexed 25 days ago
https://github.com/orchestral/testbenchA specialized testing helper for developers building Laravel packages that provides a simulated Laravel environment to facilitate comprehensive testing of package functionality.
When upgrading to version 11.0.0, note the following removals of deprecated components and annotations:
Orchestra\Testbench\Foundation\Env classOrchestra\Testbench\Foundation\Console\Concerns\HandleTerminatingConsole traitOrchestra\Testbench\Foundation\Console\Actions\Action::pathLocation() methodorchestra\testbench\laravel_migration_path() functionThe following annotations are no longer supported:
@define-env@environment-setup@define-db@define-route11.1.0, the minimum supported version for Testbench Core is v11.2.0 or higher.Starting from version 10.9.0, you can use the Orchestra estbench\Concerns\WithFixtures trait in your tests to automatically load fixture files.
Additionally, in version 10.10.0, you can configure your testbench.yaml file with seeders: true to automatically run seeders during the test setup.
Orchestra\Testbench\package_version_compare() function is available to help compare package versions within your testing environment.11.1.0, a new method flushState() was added to FormRequest. This method should be used to reset the global strict mode between tests to ensure test isolation.Orchestra\Testbench\remote() function supports passing a Closure as an argument, allowing for more flexible remote command execution.