// ->getOption()
$t->diag('->getOption()');
$optionSet = new sfCommandOptionSet();
$optionSet->addOptions(array($foo));
$t->is($optionSet->getOption('foo'), $foo, '->getOption() returns a sfCommandOption by its name');
try {
    $optionSet->getOption('bar');
    $t->fail('->getOption() throws an exception if the option name does not exist');
} catch (sfCommandException $e) {
    $t->pass('->getOption() throws an exception if the option name does not exist');
}
// ->hasOption()
$t->diag('->hasOption()');
$optionSet = new sfCommandOptionSet();
$optionSet->addOptions(array($foo));
$t->is($optionSet->hasOption('foo'), true, '->hasOption() returns true if a sfCommandOption exists for the given name');
$t->is($optionSet->hasOption('bar'), false, '->hasOption() returns false if a sfCommandOption exists for the given name');
// ->hasShortcut()
$t->diag('->hasShortcut()');
$optionSet = new sfCommandOptionSet();
$optionSet->addOptions(array($foo));
$t->is($optionSet->hasShortcut('f'), true, '->hasShortcut() returns true if a sfCommandOption exists for the given shortcut');
$t->is($optionSet->hasShortcut('b'), false, '->hasShortcut() returns false if a sfCommandOption exists for the given shortcut');
// ->getOptionForShortcut()
$t->diag('->getOptionForShortcut()');
$optionSet = new sfCommandOptionSet();
$optionSet->addOptions(array($foo));
$t->is($optionSet->getOptionForShortcut('f'), $foo, '->getOptionForShortcut() returns a sfCommandOption by its shortcut');
try {
    $optionSet->getOptionForShortcut('l');
    $t->fail('->getOption() throws an exception if the shortcut does not exist');