+ $tester->run(array(), array('interactive' => false));
+
+ $this->assertEquals('called'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
+ }
+
+ public function testSetRunCustomDefaultCommandWithOption()
+ {
+ $command = new \FooOptCommand();
+
+ $application = new Application();
+ $application->setAutoExit(false);
+ $application->add($command);
+ $application->setDefaultCommand($command->getName());
+
+ $tester = new ApplicationTester($application);
+ $tester->run(array('--fooopt' => 'opt'), array('interactive' => false));
+
+ $this->assertEquals('called'.PHP_EOL.'opt'.PHP_EOL, $tester->getDisplay(), 'Application runs the default set command if different from \'list\' command');
+ }
+
+ public function testSetRunCustomSingleCommand()
+ {
+ $command = new \FooCommand();
+
+ $application = new Application();
+ $application->setAutoExit(false);
+ $application->add($command);
+ $application->setDefaultCommand($command->getName(), true);
+
+ $tester = new ApplicationTester($application);
+