public function execute(InputInterface $input, OutputInterface $output) { $server = $input->getArgument('server'); $key = $input->getArgument('key'); $recursive = $input->getOption('recursive'); $output->writeln("<info>Removing key `{$key}`</info>"); $client = new EtcdClient($server); $data = $client->rmdir($key, $recursive); $json = json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); echo $json; }
/** * @covers LinkORB\Component\Etcd\Client::rmdir * @expectedException \LinkORB\Component\Etcd\Exception\EtcdException */ public function testRmdir() { $this->client->mkdir('testrmdir'); $this->client->rmdir('testrmdir', true); $this->client->rmdir('testrmdir'); }