public function getOptionName() { if (preg_match('/^[-]+([a-zA-Z0-9-]+)/', $this->arg, $regs)) { return $regs[1]; } }
function test2() { $arg = new Argument('--option=value'); ok($arg->containsOptionValue()); is('value', $arg->getOptionValue()); is('option', $arg->getOptionName()); }