Any existing command options are removed when this method is called.
public setCommandOptions ( array $commandOptions ) : static | ||
$commandOptions | array | The command options of the built format. |
리턴 | static | The current instance. |
public function testSetCommandOptions() { $this->builder->addCommandOption($option1 = new CommandOption('option1')); $this->builder->setCommandOptions(array($option2 = new CommandOption('option2'), $option3 = new CommandOption('option3'))); $this->assertSame(array($option2, $option3), $this->builder->getCommandOptions()); }