public function trapErrors($trap = true) { $this->trap_errors = $trap; return $this; }
/** * 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'); }