public trapErrors ( boolean $trap = true ) : |
||
$trap | boolean | when true, exceptions will be caught by Commando and printed cleanly to standard error. |
return |
/** * Test that an exception is thrown when an option isn't set * @expectedException \InvalidArgumentException */ public function testRequirementsOnOptionsMissing() { $tokens = array('filename', '-a', 'v1'); $cmd = new Command($tokens); $cmd->trapErrors(false)->beepOnError(false); $cmd->option('a')->needs('b'); }