public function testResolveWithoutMatchingOptions()
 {
     $options = array('hello' => 'world');
     $availableOptions = array('foo', 'baz');
     $result = OptionsResolver::resolve($options, $availableOptions);
     $this->assertSame(array(), $result);
 }
Esempio n. 2
0
 public function renew($sessionId, array $options = array())
 {
     $params = array('query' => OptionsResolver::resolve($options, array('dc')));
     return $this->client->put('/v1/session/renew/' . $sessionId, $params);
 }
Esempio n. 3
0
 public function delete($key, array $options = array())
 {
     $params = array('query' => OptionsResolver::resolve($options, array('dc', 'recurse')));
     return $this->client->delete('v1/kv/' . $key, $params);
 }
Esempio n. 4
0
 public function service($service, array $options = array())
 {
     $params = array('query' => OptionsResolver::resolve($options, array('dc', 'tag')));
     return $this->client->get('/v1/catalog/service/' . $service, $params);
 }
Esempio n. 5
0
 public function failCheck($checkId, array $options = array())
 {
     $params = array('query' => OptionsResolver::resolve($options, array('note')));
     return $this->client->put('/v1/agent/check/fail/' . $checkId, $params);
 }