/** * @expectedException \Zend\Console\Exception\RuntimeException * @expectedExceptionMessage The option x is invalid. See usage. */ public function testOptionCallbackReturnsFallsAndThrowException() { $opts = new Getopt('x', array('-x')); $opts->setOptionCallback('x', function () { return false; }); $opts->parse(); }