joetannenbaum / day
Dusk-like integration testing for your CLI apps
Fund package maintenance!
Joe Tannenbaum
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^2.34
- pestphp/pest-plugin-arch: ^2.7
- pestphp/pest-plugin-laravel: ^2.3
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2024-11-08 09:02:33 UTC
README
This package provides Dusk-like integration testing for your terminal commands. Under the hood, it requires the Unix expect
command in order to function correctly.
Warning
This package is currently in active development. The API is subject to change.
Note
If you're testing Laravel commands this package currently supports only Symfony style commands, it has not been updated for Prompts yet.
Example
The following would run the bellows launch
command from the bellows-tester
directory and answer several questions as they appear in the terminal.
use Day\Day; use function Day\command; command('bellows launch') ->fromDir(__DIR__ . '/../../bellows-tester') ->question('Which server would you like to use', 'bellows-tester') ->question('App Name', 'Bellows Test') ->deny('Enable quick deploy') ->confirm('Launch now') ->waitFor('Launched!', 60) ->exec();