public function HttpTest::setUp in Migrate Plus 8.5
Same name and namespace in other branches
- 8.4 tests/src/Unit/data_fetcher/HttpTest.php \Drupal\Tests\migrate_plus\Unit\data_fetcher\HttpTest::setUp()
Set up test environment.
Overrides UnitTestCase::setUp
File
- tests/
src/ Unit/ data_fetcher/ HttpTest.php, line 90 - PHPUnit tests for the Migrate Plus Http 'data fetcher' plugin.
Class
- HttpTest
- @coversDefaultClass \Drupal\migrate_plus\Plugin\migrate_plus\data_fetcher\Http
Namespace
Drupal\Tests\migrate_plus\Unit\data_fetcherCode
public function setUp() : void {
// Mock up a Basic authentication plugin that will be used in requests.
$basic_authenticator = $this
->getMockBuilder(Basic::class)
->disableOriginalConstructor()
->getMock();
$basic_authenticator
->method('getAuthenticationOptions')
->will($this
->returnValue([
'auth' => [
'username',
'password',
],
]));
$this->basicAuthenticator = $basic_authenticator;
}