You are here

protected function AuthenticationTestBase::resetRemoteCaches in Entity Share 8.3

Helper function: unsets remote manager's cached data.

This is needed because our remote ID is not changing, and remote manager caches certain values based on the remote ID. Another solution would be to reinitialize $this->remoteManager and create new remote.

3 calls to AuthenticationTestBase::resetRemoteCaches()
AuthenticationBasicAuthTest::testImport in modules/entity_share_client/tests/src/Functional/AuthenticationBasicAuthTest.php
Test that correct entities are created with different authentications.
AuthenticationOAuthTest::testImport in modules/entity_share_client/tests/src/Functional/AuthenticationOAuthTest.php
Test that correct entities are created with different authentications.
AuthenticationOAuthTest::testTokenExpiration in modules/entity_share_client/tests/src/Functional/AuthenticationOAuthTest.php
Test behavior when access and refresh tokens are revoked.

File

modules/entity_share_client/tests/src/Functional/AuthenticationTestBase.php, line 133

Class

AuthenticationTestBase
Base class for functional tests of ES authorization plugins.

Namespace

Drupal\Tests\entity_share_client\Functional

Code

protected function resetRemoteCaches() {
  $this->remoteManager
    ->resetRemoteInfos();
  $this->remoteManager
    ->resetHttpClientsCache('json_api');

  // Reset "remote" response mapping (ie. cached JSON:API responses).
  $this->remoteManager
    ->resetResponseMapping();
}