You are here

public function TestHttp::getAuthenticationPlugin in Migrate Plus 8.4

Same name and namespace in other branches
  1. 8.5 tests/src/Unit/data_fetcher/HttpTest.php \Drupal\Tests\migrate_plus\Unit\data_fetcher\TestHttp::getAuthenticationPlugin()

Override the parent::getAuthenticationPlugin()

So we can mock the authentication plugin.

Return value

\PHPUnit_Framework_MockObject_MockObject A mocked authentication plugin.

Overrides Http::getAuthenticationPlugin

File

tests/src/Unit/data_fetcher/HttpTest.php, line 234
PHPUnit tests for the Migrate Plus Http 'data fetcher' plugin.

Class

TestHttp
Test class to mock an HTTP request.

Namespace

Drupal\Tests\migrate_plus\Unit\data_fetcher

Code

public function getAuthenticationPlugin() {
  if (!isset($this->authenticationPlugin)) {
    $this->authenticationPlugin = $this->authenticator;
  }
  return $this->authenticationPlugin;
}