You are here

public function ApplicationTest::testLegacyAsText in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\ApplicationTest::testLegacyAsText()

@group legacy

File

vendor/symfony/console/Tests/ApplicationTest.php, line 496

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testLegacyAsText() {
  $application = new Application();
  $application
    ->add(new \FooCommand());
  $this
    ->ensureStaticCommandHelp($application);
  $this
    ->assertStringEqualsFile(self::$fixturesPath . '/application_astext1.txt', $this
    ->normalizeLineBreaks($application
    ->asText()), '->asText() returns a text representation of the application');
  $this
    ->assertStringEqualsFile(self::$fixturesPath . '/application_astext2.txt', $this
    ->normalizeLineBreaks($application
    ->asText('foo')), '->asText() returns a text representation of the application');
}