/** * @param AbstractCommand $command */ private function assertOptions(AbstractCommand $command) { $expected = array_merge($this->getDefaultOptions(), $this->getExpectedOptions()); $actual = array_keys($command->getDefinition()->getOptions()); $this->assertEquals([], array_diff($expected, $actual), 'There are more options than expected'); $this->assertEquals([], array_diff($actual, $expected), 'There are less options than expected'); }
/** * {@inheritdoc} */ protected function configure() { parent::configure(); $this->setName('self:update'); $this->setDescription('Updates slack.phar to the latest version'); $this->setAliases(['self.update']); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->setName('config:list'); $this->setDescription('Lists all the keys and values from the global configuration'); $this->setHelp(<<<EOT The <info>config:list</info> command lists all the keys and values from the global configuration. EOT ); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->setName('config:unset'); $this->setDescription('Removes the given setting from the configuration'); $this->addArgument('setting', InputArgument::REQUIRED, 'The setting to remove'); $this->setHelp(<<<EOT The <info>config:unset</info> command lets you remove a given setting (and it's value) in the global configuration. To list all stored settings and values, use the <info>config.list</info> command. EOT ); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->setName('config:get'); $this->setDescription('Retrieves the value that is set for the given setting from the configuration'); $this->addArgument('setting', InputArgument::REQUIRED, 'The key to use'); $this->setHelp(<<<EOT The <info>config:get</info> command retrieves the value that is set for the given setting from the configuration. To list all stored keys and values, use the <info>config.list</info> command. EOT ); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->setName('config:set'); $this->setDescription('Stores the given setting and value in the global configuration'); $this->addArgument('setting', InputArgument::REQUIRED, 'The setting to use'); $this->addArgument('value', InputArgument::REQUIRED, 'The value to set for this setting'); $this->setHelp(<<<EOT The <info>config:set</info> command lets you store a given setting and value in the global configuration. To list all stored settings and values, use the <info>config.list</info> command. EOT ); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->setName('config:edit'); $this->setDescription('Edit config options'); $this->setHelp(<<<EOT The <info>config:edit</info> command allows you to edit the Slack CLI settings using a pre-configured editor. To choose your editor you can set the "SLACK_CONFIG_EDITOR" environment variable. To get a list of configuration values in the file, use the `config:list` command: <comment>slack.phar config:list</comment> EOT ); }
/** * {@inheritDoc} */ protected function configure() { parent::configure(); $this->addOption('token', 't', InputOption::VALUE_REQUIRED, 'Token to use during the API-call (defaults to the one defined in the global configuration)'); }