You are here

public function TestRemoteManager::resetHttpClientsCache in Entity Share 8.3

Clear the HTTP clients caching.

This is useful if it is needed to emulate a runtime change of remote.

Parameters

string $type: Whether to reset JSON:API or regular HTTP clients cache.

File

modules/entity_share_client/tests/modules/entity_share_client_remote_manager_test/src/Service/TestRemoteManager.php, line 59

Class

TestRemoteManager
Service that allows to emulate another website in tests.

Namespace

Drupal\entity_share_client_remote_manager_test\Service

Code

public function resetHttpClientsCache(string $type) {
  switch ($type) {
    case 'json_api':
      $this->jsonApiHttpClients = [];
      break;
    default:
      $this->httpClients = [];
      break;
  }
}