public function testGetoptSetHelpInvalid() { $opts = new Getopt('abp:', array('-a')); $opts->setHelp(array( 'a' => 'apple', 'b' => 'banana', 'p' => 'pear', 'c' => 'cumquat')); $message = preg_replace('/Usage: .* \[ options \]/', 'Usage: <progname> [ options ]', $opts->getUsageMessage()); $message = preg_replace('/ /', '_', $message); $this->assertEquals($message, "Usage:_<progname>_[_options_]\n-a___________________apple\n-b___________________banana\n-p_<string>__________pear\n"); }