/** * Set up test environment */ public function setUp() { parent::setUp(); $this->client = new Client(); if ($this->client->dirExists('/phpunit_test')) { $this->client->removeDir('/phpunit_test', true); } $this->client->createDir('/phpunit_test'); $this->client->setSandboxPath('/phpunit_test'); $this->client->set('FIRST', 1); $this->client->set('SECOND', 2); $this->repository = new ConfigRepository(new EtcdAdapter($this->client)); }
/** * @expectedException \ActiveCollab\Etcd\Exception\EtcdException */ public function testRemoveDir() { $this->client->createDir('testrmdir'); $this->client->removeDir('testrmdir', true); $this->client->removeDir('testrmdir'); }