public function execute(InputInterface $input, OutputInterface $output) { $server = $input->getArgument('server'); $key = $input->getArgument('key'); $ttl = $input->getOption('ttl'); $output->writeln("<info>making directory `{$key}`</info>"); $client = new EtcdClient($server); $data = $client->mkdir($key, $ttl); $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'); }