8000 Merge pull request #764 from ftassi/issue_654 · GromNaN/symfony-docs@cf7fb21 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf7fb21

Browse files
committed
Merge pull request symfony#764 from ftassi/issue_654
Issue 654
2 parents 7d0deae + 9f80235 commit cf7fb21

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cookbook/console.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,17 +207,19 @@ console::
207207

208208
use Symfony\Component\Console\Tester\CommandTester;
209209
use Symfony\Bundle\FrameworkBundle\Console\Application;
210+
use Acme\DemoBundle\Command\GreetCommand.php;
210211

211212
class ListCommandTest extends \PHPUnit_Framework_TestCase
212213
{
213214
public function testExecute()
214215
{
215216
// mock the Kernel or create one depending on your needs
216217
$application = new Application($kernel);
218+
$application->add(new GreetCommand());
217219

218220
$command = $application->find('demo:greet');
219221
$commandTester = new CommandTester($command);
220-
$commandTester->execute(array('command' => $command->getFullName()));
222+
$commandTester->execute(array('command' => $command->getName()));
221223

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

0 commit comments

Comments
 (0)
0