Skip to content

Commit 921a63b

Browse files
xabbuhweaverryan
authored andcommitted
put back the command argument when executing a command in the CommandTester
1 parent a483290 commit 921a63b

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

cookbook/console/console_command.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,11 @@ instead of
105105
$command = $application->find('demo:greet');
106106
$commandTester = new CommandTester($command);
107107
$commandTester->execute(
108-
array(
109-
'name' => 'Fabien',
110-
'--yell' => true,
111-
)
108+
array(
109+
'command' => $command->getName(),
110+
'name' => 'Fabien',
111+
'--yell' => true,
112+
)
112113
);
113114

114115
$this->assertRegExp('/.../', $commandTester->getDisplay());
@@ -145,10 +146,11 @@ you can extend your test from
145146
$command = $application->find('demo:greet');
146147
$commandTester = new CommandTester($command);
147148
$commandTester->execute(
148-
array(
149-
'name' => 'Fabien',
150-
'--yell' => true,
151-
)
149+
array(
150+
'command' => $command->getName(),
151+
'name' => 'Fabien',
152+
'--yell' => true,
153+
)
152154
);
153155

154156
$this->assertRegExp('/.../', $commandTester->getDisplay());

0 commit comments

Comments
 (0)