Test helper for developing Laravel packages
open sourceMITfree
Testbench lets you write feature and integration tests for a Laravel package without building a whole Laravel app around it: it boots a Laravel application inside your package's tests, where you define the environment, databases, routes and service providers the tests need. A testbench.yaml file configures autoloading and the skeleton app, the testbench command-line tool runs Artisan commands and serves a workbench app for trying the package by hand, and Testbench Dusk adds browser tests. Each Testbench version matches a Laravel version.
Problems it solves
- test my Laravel package without creating a full Laravel app
- run feature tests with database migrations for a Laravel package
- try out a Laravel package I'm developing in a throwaway app
Features
- boots a Laravel app inside package tests
- define environment, databases, routes and providers per test
- testbench.yaml configuration
- testbench CLI and workbench app
- Testbench Dusk for browser tests
Capabilities
| Has a command line tool | plan not known |
|---|
