You are here

protected function EntityShareAsyncFunctionalTest::populateRequestService in Entity Share 8.2

Same name and namespace in other branches
  1. 8.3 modules/entity_share_async/tests/src/Functional/EntityShareAsyncFunctionalTest.php \Drupal\Tests\entity_share_async\Functional\EntityShareAsyncFunctionalTest::populateRequestService()

Helper function to populate the request service with responses.

Overrides EntityShareClientFunctionalTestBase::populateRequestService

File

modules/entity_share_async/tests/src/Functional/EntityShareAsyncFunctionalTest.php, line 114

Class

EntityShareAsyncFunctionalTest
General functional test class.

Namespace

Drupal\Tests\entity_share_async\Functional

Code

protected function populateRequestService() {
  parent::populateRequestService();
  $this->jsonapiHelper
    ->setRemote($this->remote);
  $http_client = $this->remoteManager
    ->prepareJsonApiClient($this->remote);

  // Needs to make the requests when only the referencing content will be
  // required.
  $selected_entities = [
    'es_test',
  ];
  $prepared_url = $this
    ->prepareUrlFilteredOnUuids($selected_entities, 'node_es_test_en');
  $this
    ->discoverJsonApiEndpoints($http_client, $prepared_url);
}