You are here

public function ApplicationTest::testOverwritingDefaultHelperSetOverwritesDefaultValues 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::testOverwritingDefaultHelperSetOverwritesDefaultValues()

File

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

Class

ApplicationTest

Namespace

Symfony\Component\Console\Tests

Code

public function testOverwritingDefaultHelperSetOverwritesDefaultValues() {
  $application = new CustomApplication();
  $application
    ->setAutoExit(false);
  $application
    ->setCatchExceptions(false);
  $application
    ->setHelperSet(new HelperSet(array(
    new FormatterHelper(),
  )));
  $helperSet = $application
    ->getHelperSet();
  $this
    ->assertTrue($helperSet
    ->has('formatter'));

  // no other default helper set should be returned
  $this
    ->assertFalse($helperSet
    ->has('dialog'));
  $this
    ->assertFalse($helperSet
    ->has('progress'));
}