railken / lara-command-test
Installs: 41
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/railken/lara-command-test
Requires
- php: >=7.0.0
- phpstan/phpstan: ^0.9.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.8.1
- orchestra/testbench: ~3.6
- phpunit/phpunit: ~7.0
- spatie/pdf-to-text: ^1.1
This package is auto-updated.
Last update: 2025-10-05 20:46:32 UTC
README
A laravel package to call commands that have prompt inputs
Simple usage
use Illuminate\Console\Command; class DummyCommand extends Command { /** * Execute the console command. * * @return mixed */ public function handle() { if ($this->confirm("Should we go?")) { $response = $this->ask('Is it hello?'); return $response === 'Hello' ? 1 : 0; } return 0; } }
use Railken\LaraCommandTest\Helper; $helper = new Helper(__DIR__ . "/../var/cache"); $command = $helper->generate(DummyCommand::class, [ 'yes', 'Hello' ]); $helper->call($command, []);