mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 20:54:03 +00:00
run command useable for questions asking commands
This commit is contained in:
parent
ca2eefa30a
commit
50d903feb8
4 changed files with 70 additions and 5 deletions
|
|
@ -179,6 +179,17 @@ test('run command with array of tenants works', function () {
|
|||
->expectsOutput('Tenant: ' . $tenantId2);
|
||||
});
|
||||
|
||||
test('run command works when sub command asks question and accepts argument', function () {
|
||||
$id = Tenant::create()->getTenantKey();
|
||||
|
||||
Artisan::call('tenants:migrate', ['--tenants' => [$id]]);
|
||||
|
||||
pest()->artisan("tenants:run --tenants=$id 'age:ask Abrar' ")
|
||||
->expectsQuestion('What is your age?', 22)
|
||||
->expectsOutput("Tenant: $id")
|
||||
->expectsOutput("Abrar's age is 22.");
|
||||
});
|
||||
|
||||
// todo@tests
|
||||
function runCommandWorks(): void
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue