* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ require_once __DIR__.'/../../../../bootstrap.php'; use Symfony\Components\CLI\Tester\CommandTester; use Symfony\Components\CLI\Application; $t = new LimeTest(2); $application = new Application(); // ->execute() $t->diag('->execute()'); $commandTester = new CommandTester($application->getCommand('list')); $commandTester->execute(array()); $t->like($commandTester->getDisplay(), '/help Displays help for a command/', '->execute() returns a list of available commands'); $commandTester->execute(array('--xml' => true)); $t->like($commandTester->getDisplay(), '//', '->execute() returns a list of available commands in XML if --xml is passed');