public function ApplicationTest::testRunWithExceptionAndDispatcher in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/console/Tests/ApplicationTest.php \Symfony\Component\Console\Tests\ApplicationTest::testRunWithExceptionAndDispatcher()
@expectedException \LogicException @expectedExceptionMessage caught
File
- vendor/
symfony/ console/ Tests/ ApplicationTest.php, line 894
Class
Namespace
Symfony\Component\Console\TestsCode
public function testRunWithExceptionAndDispatcher() {
$application = new Application();
$application
->setDispatcher($this
->getDispatcher());
$application
->setAutoExit(false);
$application
->setCatchExceptions(false);
$application
->register('foo')
->setCode(function (InputInterface $input, OutputInterface $output) {
throw new \RuntimeException('foo');
});
$tester = new ApplicationTester($application);
$tester
->run(array(
'command' => 'foo',
));
}