File tree 1 file changed +3
-1
lines changed 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -207,17 +207,19 @@ console::
207
207
208
208
use Symfony\Component\Console\Tester\CommandTester;
209
209
use Symfony\Bundle\FrameworkBundle\Console\Application;
210
+ use Acme\DemoBundle\Command\GreetCommand.php;
210
211
211
212
class ListCommandTest extends \PHPUnit_Framework_TestCase
212
213
{
213
214
public function testExecute()
214
215
{
215
216
// mock the Kernel or create one depending on your needs
216
217
$application = new Application($kernel);
218
+ $application->add(new GreetCommand());
217
219
218
220
$command = $application->find('demo:greet');
219
221
$commandTester = new CommandTester($command);
220
- $commandTester->execute(array('command' => $command->getFullName ()));
222
+ $commandTester->execute(array('command' => $command->getName ()));
221
223
222
224
$this->assertRegExp('/.../', $commandTester->getDisplay());
223
225
You can’t perform that action at this time.
0 commit comments