/**
* @expectedException \Webmozart\Console\Api\Command\NoSuchCommandException
*/
public function testThrowExceptionIfCatchingNotActive()
{
$this->config->setCatchExceptions(false)->beginCommand('list')->setHandler(new CallbackHandler(function () {
throw NoSuchCommandException::forCommandName('foobar', 123);
}))->end();
$args = new StringArgs('list');
$input = new StringInputStream();
$output = new BufferedOutputStream();
$errorOutput = new BufferedOutputStream();
$application = new ConsoleApplication($this->config);
$application->run($args, $input, $output, $errorOutput);
}