public function testExitCode255()
 {
     $app = new Application('test', 'beta');
     $app->setAutoExit(true);
     $app->add(new TestCommand());
     $tester = new ApplicationTester($app);
     $tester->run(array('command' => 'test:command', '--exit-code' => '1024', '--output' => 'test output'));
     $this->assertEquals('test output' . PHP_EOL, $tester->getDisplay());
     $this->assertEquals(255, $tester->getStatusCode());
 }
 /**
  * @expectedException InvalidArgumentException
  * @expectedExceptionMessageRegExp /The "\w+" option is not specified and not found in the config "sugarcrm\.\w+"/
  */
 public function testWrongDefaultOptionsOptionNotFound()
 {
     $cmd_name = 'test:default';
     $config = new Config(array(__DIR__ . '/../yaml/empty.yaml'));
     $config->load();
     $app = new Application();
     $app->configure();
     $app->setAutoExit(false);
     $app->getContainer()->set('config', $config);
     $app->add(new TestConfigOptionCommand($cmd_name));
     $command = $app->find($cmd_name);
     $commandTester = new CommandTester($command);
     $commandTester->execute(array('command' => $cmd_name));
 }