public function AdvisoriesTestHttpClient::get in Drupal 9
File
- core/modules/system/tests/modules/advisory_feed_test/src/AdvisoriesTestHttpClient.php, line 33
Class
- AdvisoriesTestHttpClient
- Provides a decorator service for the 'http_client' service for testing.
Namespace
Drupal\advisory_feed_test
Code
public function get($uri, array $options = []) : ResponseInterface {
$test_end_point = \Drupal::state()
->get('advisories_test_endpoint');
if ($test_end_point && strpos($uri, '://updates.drupal.org/psa.json') !== FALSE) {
$uri = $test_end_point;
}
return $this->innerClient
->get($uri, $options);
}