You are here

public static function GcImportTestBase::getClient in GatherContent 8.5

Same name and namespace in other branches
  1. 8.4 tests/src/Kernel/GcImportTestBase.php \Drupal\Tests\gathercontent\Kernel\GcImportTestBase::getClient()

Get singleton Mock client.

File

tests/src/Kernel/GcImportTestBase.php, line 63

Class

GcImportTestBase
Base class for import kernel tests.

Namespace

Drupal\Tests\gathercontent\Kernel

Code

public static function getClient() {
  static $client = NULL;
  if ($client === NULL) {
    $client = new MockDrupalGatherContentClient(\Drupal::service('http_client'));
  }
  return $client;
}