public function DummyALProfilesHttpClient::get in Acquia Lift Connector 7
Same name and namespace in other branches
- 7.2 acquia_lift_profiles/tests/acquia_lift_profiles.test_classes.inc \DummyALProfilesHttpClient::get()
Implements AcquiaLiftDrupalHttpClientInterface::get().
Overrides DummyAcquiaLiftHttpClient::get
File
- acquia_lift_profiles/
tests/ acquia_lift_profiles.test_classes.inc, line 20
Class
- DummyALProfilesHttpClient
- Classes used for testing.
Code
public function get($uri = null, $headers = null, array $options = array()) {
$this
->logRequest('get', $uri, $headers, $options);
$data = array();
if (strpos($uri, 'segments') !== FALSE) {
$data = isset($this->data['segments']) ? $this->data['segments'] : array();
}
elseif (strpos($uri, 'events') !== FALSE) {
$data = isset($this->data['events']) ? $this->data['events'] : array();
}
return $this
->generateDummyResponse($data);
}