$definition =
new InputDefinition([$this->foo
]);
$this->
assertTrue($definition->
hasOption('foo'
), '->hasOption() returns true if a InputOption exists for the given name'
);
$this->
assertFalse($definition->
hasOption('bar'
), '->hasOption() returns false if a InputOption exists for the given name'
);
} public function testHasShortcut() { $this->
initializeOptions();
$definition =
new InputDefinition([$this->foo
]);
$this->
assertTrue($definition->
hasShortcut('f'
), '->hasShortcut() returns true if a InputOption exists for the given shortcut'
);
$this->
assertFalse($definition->
hasShortcut('b'
), '->hasShortcut() returns false if a InputOption exists for the given shortcut'
);
} public function testGetOptionForShortcut() { $this->
initializeOptions();
$definition =
new InputDefinition([$this->foo
]);
$this->
assertEquals($this->foo,
$definition->
getOptionForShortcut('f'
), '->getOptionForShortcut() returns a InputOption by its shortcut'
);
}