You are here

protected function ApplicationTesterTest::setUp in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php \Symfony\Component\Console\Tests\Tester\ApplicationTesterTest::setUp()

File

vendor/symfony/console/Tests/Tester/ApplicationTesterTest.php, line 23

Class

ApplicationTesterTest

Namespace

Symfony\Component\Console\Tests\Tester

Code

protected function setUp() {
  $this->application = new Application();
  $this->application
    ->setAutoExit(false);
  $this->application
    ->register('foo')
    ->addArgument('foo')
    ->setCode(function ($input, $output) {
    $output
      ->writeln('foo');
  });
  $this->tester = new ApplicationTester($this->application);
  $this->tester
    ->run(array(
    'command' => 'foo',
    'foo' => 'bar',
  ), array(
    'interactive' => false,
    'decorated' => false,
    'verbosity' => Output::VERBOSITY_VERBOSE,
  ));
}