hasOption() public method

You can either pass the long or the short name of the option.
public hasOption ( string $name, boolean $includeBase = true ) : boolean
$name string The long or short option name.
$includeBase boolean Whether to include options in the base format in the search.
return boolean Returns `true` if the option with the given name could be found and `false` otherwise.
 /**
  * @expectedException \InvalidArgumentException
  */
 public function testHasOptionFailsIfIncludeBaseNoBoolean()
 {
     $this->builder->hasOption('option', 1234);
 }