From 304e13daa329b2e10f672721f0cbf9d860bb06c0 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Sun, 12 Feb 2012 16:37:55 +0100 Subject: [PATCH] replaced command names with supported placeholders in help texts --- .../Command/AssetsInstallCommand.php | 10 +-- .../Command/CacheClearCommand.php | 6 +- .../Command/CacheWarmupCommand.php | 2 +- .../Command/ConfigDumpReferenceCommand.php | 11 ++-- .../Command/ContainerDebugCommand.php | 10 +-- .../Command/RouterApacheDumperCommand.php | 6 +- .../Command/RouterDebugCommand.php | 6 +- .../Command/RouterMatchCommand.php | 6 +- .../Command/TranslationUpdateCommand.php | 11 ++-- .../SecurityBundle/Command/InitAclCommand.php | 11 ++-- .../Component/Console/Command/HelpCommand.php | 11 ++-- .../Component/Console/Command/ListCommand.php | 15 ++--- .../Component/Console/Output/Output.php | 6 +- .../Console/Tester/ApplicationTester.php | 2 + .../Component/Console/ApplicationTest.php | 63 +++++++------------ .../Console/Fixtures/application_asxml1.txt | 16 ++--- .../Console/Fixtures/application_run1.txt | 17 ----- .../Console/Fixtures/application_run2.txt | 26 -------- .../Console/Fixtures/application_run3.txt | 27 -------- .../Console/Fixtures/application_run4.txt | 1 - 20 files changed, 89 insertions(+), 174 deletions(-) delete mode 100644 tests/Symfony/Tests/Component/Console/Fixtures/application_run1.txt delete mode 100644 tests/Symfony/Tests/Component/Console/Fixtures/application_run2.txt delete mode 100644 tests/Symfony/Tests/Component/Console/Fixtures/application_run3.txt delete mode 100644 tests/Symfony/Tests/Component/Console/Fixtures/application_run4.txt diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php index fd756a2f7103..bc145a241a41 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/AssetsInstallCommand.php @@ -31,6 +31,7 @@ class AssetsInstallCommand extends ContainerAwareCommand protected function configure() { $this + ->setName('assets:install') ->setDefinition(array( new InputArgument('target', InputArgument::REQUIRED, 'The target directory (usually "web")'), )) @@ -38,10 +39,10 @@ protected function configure() ->addOption('relative', null, InputOption::VALUE_NONE, 'Make relative symlinks') ->setDescription('Installs bundles web assets under a public web directory') ->setHelp(<<assets:install command installs bundle assets into a given +The %command.name% command installs bundle assets into a given directory (e.g. the web directory). -php app/console assets:install web +php %command.full_name% web A "bundles" directory will be created inside the target directory, and the "Resources/public" directory of each bundle will be copied into it. @@ -49,15 +50,14 @@ protected function configure() To create a symlink to each bundle instead of copying its assets, use the --symlink option: -php app/console assets:install web --symlink +php %command.full_name% web --symlink To make symlink relative, add the --relative option: -php app/console assets:install web --symlink --relative +php %command.full_name% web --symlink --relative EOT ) - ->setName('assets:install') ; } diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php index fdce7084f210..a9aa7a5b8f6f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheClearCommand.php @@ -40,11 +40,11 @@ protected function configure() )) ->setDescription('Clears the cache') ->setHelp(<<cache:clear command clears the application cache for a given environment +The %command.name% command clears the application cache for a given environment and debug mode: -php app/console cache:clear --env=dev -php app/console cache:clear --env=prod --no-debug +php %command.full_name% --env=dev +php %command.full_name% --env=prod --no-debug EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php index 1c2ba0e79031..e997e55df78c 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php @@ -34,7 +34,7 @@ protected function configure() )) ->setDescription('Warms up an empty cache') ->setHelp(<<cache:warmup command warms up the cache. +The %command.name% command warms up the cache. Before running this command, the cache must be empty. EOF diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php index 30a870df75f1..3886c912607b 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ConfigDumpReferenceCommand.php @@ -33,24 +33,23 @@ class ConfigDumpReferenceCommand extends ContainerDebugCommand protected function configure() { $this + ->setName('config:dump-reference') ->setDefinition(array( new InputArgument('name', InputArgument::REQUIRED, 'The Bundle or extension alias') )) - ->setName('config:dump-reference') - ->setDescription('Dumps default configuration for an extension.') + ->setDescription('Dumps default configuration for an extension') ->setHelp(<<config:dump-reference command dumps the default configuration for an extension/bundle. +The %command.name% command dumps the default configuration for an extension/bundle. The extension alias or bundle name can be used: Example: - %command.name% framework + php %command.full_name% framework or - %command.name% FrameworkBundle - + php %command.full_name% FrameworkBundle EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php index 222984896555..dcfe53aa7ab6 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/ContainerDebugCommand.php @@ -40,25 +40,25 @@ class ContainerDebugCommand extends ContainerAwareCommand protected function configure() { $this + ->setName('container:debug') ->setDefinition(array( new InputArgument('name', InputArgument::OPTIONAL, 'A service name (foo)'), new InputOption('show-private', null, InputOption::VALUE_NONE, 'Use to show public *and* private services'), )) - ->setName('container:debug') ->setDescription('Displays current services for an application') ->setHelp(<<container:debug command displays all configured public services: +The %command.name% command displays all configured public services: - container:debug + php %command.full_name% To get specific information about a service, specify its name: - container:debug validator + php %command.full_name% validator By default, private services are hidden. You can display all services by using the --show-private flag: - container:debug --show-private + php %command.full_name% --show-private EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php index c19699c8b976..12fe9b028e07 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterApacheDumperCommand.php @@ -47,18 +47,18 @@ public function isEnabled() protected function configure() { $this + ->setName('router:dump-apache') ->setDefinition(array( new InputArgument('script_name', InputArgument::OPTIONAL, 'The script name of the application\'s front controller.'), new InputOption('base-uri', null, InputOption::VALUE_REQUIRED, 'The base URI'), )) - ->setName('router:dump-apache') ->setDescription('Dumps all routes as Apache rewrite rules') ->setHelp(<<router:dump-apache dumps all routes as Apache rewrite rules. +The %command.name% dumps all routes as Apache rewrite rules. These can then be used with the ApacheUrlMatcher to use Apache for route matching. - router:dump-apache + php %command.full_name% EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php index 482f0ad7630e..01be52a02a52 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterDebugCommand.php @@ -46,15 +46,15 @@ public function isEnabled() protected function configure() { $this + ->setName('router:debug') ->setDefinition(array( new InputArgument('name', InputArgument::OPTIONAL, 'A route name'), )) - ->setName('router:debug') ->setDescription('Displays current routes for an application') ->setHelp(<<router:debug displays the configured routes: +The %command.name% displays the configured routes: - router:debug + php %command.full_name% EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php index 5207ee7bd04d..a6b4b085563f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/RouterMatchCommand.php @@ -46,15 +46,15 @@ public function isEnabled() protected function configure() { $this + ->setName('router:match') ->setDefinition(array( new InputArgument('path_info', InputArgument::REQUIRED, 'A path info'), )) - ->setName('router:match') ->setDescription('Helps debug routes by simulating a path info match') ->setHelp(<<router:match simulates a path info match: +The %command.name% simulates a path info match: - router:match /foo + php %command.full_name% /foo EOF ) ; diff --git a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php index 4997738dba56..0d7a56c2be0f 100644 --- a/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php +++ b/src/Symfony/Bundle/FrameworkBundle/Command/TranslationUpdateCommand.php @@ -40,7 +40,6 @@ protected function configure() { $this ->setName('translation:update') - ->setDescription('Update the translation file') ->setDefinition(array( new InputArgument('locale', InputArgument::REQUIRED, 'The locale'), new InputArgument('bundle', InputArgument::REQUIRED, 'The bundle where to load the messages'), @@ -61,16 +60,18 @@ protected function configure() 'Should the update be done' ) )) + ->setDescription('Update the translation file') ->setHelp(<<translation:update command extract translation strings from templates +The %command.name% command extract translation strings from templates of a given bundle. It can display them or merge the new ones into the translation files. When new translation strings are found it can automatically add a prefix to the translation message. -php app/console translation:update --dump-messages en AcmeBundle -php app/console translation:update --force --prefix="new_" fr AcmeBundle +php %command.full_name% --dump-messages en AcmeBundle +php %command.full_name% --force --prefix="new_" fr AcmeBundle EOF - ); + ) + ; } /** diff --git a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php index b717f97c86ad..eaa518f97b03 100644 --- a/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php +++ b/src/Symfony/Bundle/SecurityBundle/Command/InitAclCommand.php @@ -32,18 +32,19 @@ protected function configure() $this ->setName('init:acl') ->setDescription('Mounts ACL tables in the database') - ->setHelp(<<init:acl command mounts ACL tables in the database. + ->setHelp(<<%command.name% command mounts ACL tables in the database. -php app/console init:acl +php %command.full_name% The name of the DBAL connection must be configured in your app/config/security.yml configuration file in the security.acl.connection variable. security: acl: connection: default -EOT - ); +EOF + ) + ; } /** diff --git a/src/Symfony/Component/Console/Command/HelpCommand.php b/src/Symfony/Component/Console/Command/HelpCommand.php index 9b4256899b2d..93c81045c704 100644 --- a/src/Symfony/Component/Console/Command/HelpCommand.php +++ b/src/Symfony/Component/Console/Command/HelpCommand.php @@ -35,22 +35,23 @@ protected function configure() $this->ignoreValidationErrors(); $this + ->setName('help') ->setDefinition(array( new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), new InputOption('xml', null, InputOption::VALUE_NONE, 'To output help as XML'), )) - ->setName('help') ->setDescription('Displays help for a command') ->setHelp(<<help command displays help for a given command: +The %command.name% command displays help for a given command: - php app/console help list + php %command.full_name% list You can also output the help as XML by using the --xml option: - php app/console help --xml list + php %command.full_name% --xml list EOF - ); + ) + ; } /** diff --git a/src/Symfony/Component/Console/Command/ListCommand.php b/src/Symfony/Component/Console/Command/ListCommand.php index 14f6f430d137..032de16c1ccf 100644 --- a/src/Symfony/Component/Console/Command/ListCommand.php +++ b/src/Symfony/Component/Console/Command/ListCommand.php @@ -32,27 +32,28 @@ class ListCommand extends Command protected function configure() { $this - ->setDefinition($this->createDefinition()) ->setName('list') + ->setDefinition($this->createDefinition()) ->setDescription('Lists commands') ->setHelp(<<list command lists all commands: +The %command.name% command lists all commands: - php app/console list + php %command.full_name% You can also display the commands for a specific namespace: - php app/console list test + php %command.full_name% test You can also output the information as XML by using the --xml option: - php app/console list --xml + php %command.full_name% --xml It's also possible to get raw list of commands (useful for embedding command runner): - php app/console list --raw + php %command.full_name% --raw EOF - ); + ) + ; } /** diff --git a/src/Symfony/Component/Console/Output/Output.php b/src/Symfony/Component/Console/Output/Output.php index 4e3ffa1ab16f..2227880160cc 100644 --- a/src/Symfony/Component/Console/Output/Output.php +++ b/src/Symfony/Component/Console/Output/Output.php @@ -43,12 +43,8 @@ abstract class Output implements OutputInterface */ public function __construct($verbosity = self::VERBOSITY_NORMAL, $decorated = null, OutputFormatterInterface $formatter = null) { - if (null === $formatter) { - $formatter = new OutputFormatter(); - } - $this->verbosity = null === $verbosity ? self::VERBOSITY_NORMAL : $verbosity; - $this->formatter = $formatter; + $this->formatter = null === $formatter ? new OutputFormatter() : $formatter; $this->formatter->setDecorated((Boolean) $decorated); } diff --git a/src/Symfony/Component/Console/Tester/ApplicationTester.php b/src/Symfony/Component/Console/Tester/ApplicationTester.php index e3093cade20a..9412fbabfc52 100644 --- a/src/Symfony/Component/Console/Tester/ApplicationTester.php +++ b/src/Symfony/Component/Console/Tester/ApplicationTester.php @@ -13,6 +13,8 @@ use Symfony\Component\Console\Application; use Symfony\Component\Console\Input\ArrayInput; +use Symfony\Component\Console\Input\InputInterface; +use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\StreamOutput; /** diff --git a/tests/Symfony/Tests/Component/Console/ApplicationTest.php b/tests/Symfony/Tests/Component/Console/ApplicationTest.php index 4e4e2fa59f2f..c413108e1004 100644 --- a/tests/Symfony/Tests/Component/Console/ApplicationTest.php +++ b/tests/Symfony/Tests/Component/Console/ApplicationTest.php @@ -12,12 +12,13 @@ namespace Symfony\Tests\Component\Console; use Symfony\Component\Console\Application; -use Symfony\Component\Console\Output\Output; -use Symfony\Component\Console\Tester\ApplicationTester; +use Symfony\Component\Console\Formatter\OutputFormatter; +use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputOption; -use Symfony\Component\Console\Input\ArrayInput; use Symfony\Component\Console\Output\NullOutput; +use Symfony\Component\Console\Output\Output; +use Symfony\Component\Console\Tester\ApplicationTester; class ApplicationTest extends \PHPUnit_Framework_TestCase { @@ -317,7 +318,7 @@ public function testRenderException() $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception1.txt', $this->normalize($tester->getDisplay()), '->renderException() renders a pretty exception'); $tester->run(array('command' => 'foo'), array('decorated' => false, 'verbosity' => Output::VERBOSITY_VERBOSE)); - $this->assertRegExp('/Exception trace/', $this->normalize($tester->getDisplay()), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); + $this->assertContains('Exception trace', $this->normalize($tester->getDisplay()), '->renderException() renders a pretty exception with a stack trace when verbosity is verbose'); $tester->run(array('command' => 'list', '--foo' => true), array('decorated' => false)); $this->assertStringEqualsFile(self::$fixturesPath.'/application_renderexception2.txt', $this->normalize($tester->getDisplay()), '->renderException() renders the command synopsis when an exception occurs in the context of a command'); @@ -341,82 +342,66 @@ public function testRun() $application->run(); ob_end_clean(); - $this->assertEquals('Symfony\Component\Console\Input\ArgvInput', get_class($command->input), '->run() creates an ArgvInput by default if none is given'); - $this->assertEquals('Symfony\Component\Console\Output\ConsoleOutput', get_class($command->output), '->run() creates a ConsoleOutput by default if none is given'); + $this->assertSame('Symfony\Component\Console\Input\ArgvInput', get_class($command->input), '->run() creates an ArgvInput by default if none is given'); + $this->assertSame('Symfony\Component\Console\Output\ConsoleOutput', get_class($command->output), '->run() creates a ConsoleOutput by default if none is given'); + + $formatter = new OutputFormatter(false); $application = new Application(); $application->setAutoExit(false); $application->setCatchExceptions(false); $tester = new ApplicationTester($application); + $tester->run(array(), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run1.txt', $this->normalize($tester->getDisplay()), '->run() runs the list command if no argument is passed'); + $this->assertSame($formatter->format($application->asText()).PHP_EOL, $tester->getDisplay(), '->run() runs the list command if no argument is passed'); $tester->run(array('--help' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $this->normalize($tester->getDisplay()), '->run() runs the help command if --help is passed'); + $this->assertSame($formatter->format($application->get('help')->asText()).PHP_EOL, $tester->getDisplay(), '->run() runs the help command if --help is passed'); $tester->run(array('-h' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run2.txt', $this->normalize($tester->getDisplay()), '->run() runs the help command if -h is passed'); + $this->assertSame($formatter->format($application->get('help')->asText()).PHP_EOL, $tester->getDisplay(), '->run() runs the help command if -h is passed'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $tester = new ApplicationTester($application); $tester->run(array('command' => 'list', '--help' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $this->normalize($tester->getDisplay()), '->run() displays the help if --help is passed'); + $this->assertSame($formatter->format($application->get('list')->asText()).PHP_EOL, $tester->getDisplay(), '->run() displays the help if --help is passed'); $tester->run(array('command' => 'list', '-h' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run3.txt', $this->normalize($tester->getDisplay()), '->run() displays the help if -h is passed'); + $this->assertSame($formatter->format($application->get('list')->asText()).PHP_EOL, $tester->getDisplay(), '->run() displays the help if -h is passed'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $tester = new ApplicationTester($application); $tester->run(array('--ansi' => true)); $this->assertTrue($tester->getOutput()->isDecorated(), '->run() forces color output if --ansi is passed'); $tester->run(array('--no-ansi' => true)); $this->assertFalse($tester->getOutput()->isDecorated(), '->run() forces color output to be disabled if --no-ansi is passed'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $tester = new ApplicationTester($application); $tester->run(array('--version' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $this->normalize($tester->getDisplay()), '->run() displays the program version if --version is passed'); + $this->assertSame($formatter->format($application->getLongVersion()).PHP_EOL, $tester->getDisplay(), '->run() displays the program version if --version is passed'); $tester->run(array('-V' => true), array('decorated' => false)); - $this->assertStringEqualsFile(self::$fixturesPath.'/application_run4.txt', $this->normalize($tester->getDisplay()), '->run() displays the program version if -v is passed'); + $this->assertSame($formatter->format($application->getLongVersion()).PHP_EOL, $tester->getDisplay(), '->run() displays the program version if -V is passed'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $tester = new ApplicationTester($application); $tester->run(array('command' => 'list', '--quiet' => true)); - $this->assertEquals('', $this->normalize($tester->getDisplay()), '->run() removes all output if --quiet is passed'); + $this->assertSame('', $tester->getDisplay(), '->run() removes all output if --quiet is passed'); $tester->run(array('command' => 'list', '-q' => true)); - $this->assertEquals('', $this->normalize($tester->getDisplay()), '->run() removes all output if -q is passed'); + $this->assertSame('', $tester->getDisplay(), '->run() removes all output if -q is passed'); - $application = new Application(); - $application->setAutoExit(false); - $application->setCatchExceptions(false); - $tester = new ApplicationTester($application); $tester->run(array('command' => 'list', '--verbose' => true)); - $this->assertEquals(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose is --verbose is passed'); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if --verbose is passed'); $tester->run(array('command' => 'list', '-v' => true)); - $this->assertEquals(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose is -v is passed'); + $this->assertSame(Output::VERBOSITY_VERBOSE, $tester->getOutput()->getVerbosity(), '->run() sets the output to verbose if -v is passed'); $application = new Application(); $application->setAutoExit(false); $application->setCatchExceptions(false); $application->add(new \FooCommand()); $tester = new ApplicationTester($application); + $tester->run(array('command' => 'foo:bar', '--no-interaction' => true), array('decorated' => false)); - $this->assertEquals("called\n", $this->normalize($tester->getDisplay()), '->run() does not called interact() if --no-interaction is passed'); + $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if --no-interaction is passed'); $tester->run(array('command' => 'foo:bar', '-n' => true), array('decorated' => false)); - $this->assertEquals("called\n", $this->normalize($tester->getDisplay()), '->run() does not called interact() if -n is passed'); + $this->assertSame('called'.PHP_EOL, $tester->getDisplay(), '->run() does not call interact() if -n is passed'); } /** diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/application_asxml1.txt b/tests/Symfony/Tests/Component/Console/Fixtures/application_asxml1.txt index ce21a328699e..3ae1fca142f4 100644 --- a/tests/Symfony/Tests/Component/Console/Fixtures/application_asxml1.txt +++ b/tests/Symfony/Tests/Component/Console/Fixtures/application_asxml1.txt @@ -4,13 +4,13 @@ help [--xml] [command_name] Displays help for a command - The <info>help</info> command displays help for a given command: + The <info>%command.name%</info> command displays help for a given command: - <info>php app/console help list</info> + <info>php %command.full_name% list</info> You can also output the help as XML by using the <comment>--xml</comment> option: - <info>php app/console help --xml list</info> + <info>php %command.full_name% --xml list</info> @@ -29,21 +29,21 @@ list [--xml] [--raw] [namespace] Lists commands - The <info>list</info> command lists all commands: + The <info>%command.name%</info> command lists all commands: - <info>php app/console list</info> + <info>php %command.full_name%</info> You can also display the commands for a specific namespace: - <info>php app/console list test</info> + <info>php %command.full_name% test</info> You can also output the information as XML by using the <comment>--xml</comment> option: - <info>php app/console list --xml</info> + <info>php %command.full_name% --xml</info> It's also possible to get raw list of commands (useful for embedding command runner): - <info>php app/console list --raw</info> + <info>php %command.full_name% --raw</info> diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/application_run1.txt b/tests/Symfony/Tests/Component/Console/Fixtures/application_run1.txt deleted file mode 100644 index 176dc881017c..000000000000 --- a/tests/Symfony/Tests/Component/Console/Fixtures/application_run1.txt +++ /dev/null @@ -1,17 +0,0 @@ -Console Tool - -Usage: - [options] command [arguments] - -Options: - --help -h Display this help message. - --quiet -q Do not output any message. - --verbose -v Increase verbosity of messages. - --version -V Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction -n Do not ask any interactive question. - -Available commands: - help Displays help for a command - list Lists commands diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/application_run2.txt b/tests/Symfony/Tests/Component/Console/Fixtures/application_run2.txt deleted file mode 100644 index f717033ad369..000000000000 --- a/tests/Symfony/Tests/Component/Console/Fixtures/application_run2.txt +++ /dev/null @@ -1,26 +0,0 @@ -Usage: - help [--xml] [command_name] - -Arguments: - command The command to execute - command_name The command name (default: 'help') - -Options: - --xml To output help as XML - --help (-h) Display this help message. - --quiet (-q) Do not output any message. - --verbose (-v) Increase verbosity of messages. - --version (-V) Display this application version. - --ansi Force ANSI output. - --no-ansi Disable ANSI output. - --no-interaction (-n) Do not ask any interactive question. - -Help: - The help command displays help for a given command: - - php app/console help list - - You can also output the help as XML by using the --xml option: - - php app/console help --xml list - diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/application_run3.txt b/tests/Symfony/Tests/Component/Console/Fixtures/application_run3.txt deleted file mode 100644 index 441db5485752..000000000000 --- a/tests/Symfony/Tests/Component/Console/Fixtures/application_run3.txt +++ /dev/null @@ -1,27 +0,0 @@ -Usage: - list [--xml] [--raw] [namespace] - -Arguments: - namespace The namespace name - -Options: - --xml To output help as XML - --raw To output raw command list - -Help: - The list command lists all commands: - - php app/console list - - You can also display the commands for a specific namespace: - - php app/console list test - - You can also output the information as XML by using the --xml option: - - php app/console list --xml - - It's also possible to get raw list of commands (useful for embedding command runner): - - php app/console list --raw - diff --git a/tests/Symfony/Tests/Component/Console/Fixtures/application_run4.txt b/tests/Symfony/Tests/Component/Console/Fixtures/application_run4.txt deleted file mode 100644 index 47187fc2673e..000000000000 --- a/tests/Symfony/Tests/Component/Console/Fixtures/application_run4.txt +++ /dev/null @@ -1 +0,0 @@ -Console Tool