protected function PasswordTest::instantiatePlugin in Feeds 8.3
Instantiates the FeedsTarget plugin "password".
Parameters
array $configuration: (optional) The configuration to pass to the plugin.
Return value
\Drupal\feeds\Feeds\Target\Password A password target instance.
4 calls to PasswordTest::instantiatePlugin()
- PasswordTest::testPrepareValueUsingHashedPassword in tests/
src/ Unit/ Feeds/ Target/ PasswordTest.php - Tests preparing a sha512 hashed password.
- PasswordTest::testPrepareValueUsingMd5Password in tests/
src/ Unit/ Feeds/ Target/ PasswordTest.php - Tests preparing a md5 hashed password.
- PasswordTest::testPrepareValueUsingMd5PasswordThatFails in tests/
src/ Unit/ Feeds/ Target/ PasswordTest.php - Tests preparing a md5 hashed password that fails.
- PasswordTest::testPrepareValueUsingPlainPassword in tests/
src/ Unit/ Feeds/ Target/ PasswordTest.php - Tests preparing a plain text password.
File
- tests/
src/ Unit/ Feeds/ Target/ PasswordTest.php, line 45
Class
- PasswordTest
- @coversDefaultClass \Drupal\feeds\Feeds\Target\Password @group feeds
Namespace
Drupal\Tests\feeds\Unit\Feeds\TargetCode
protected function instantiatePlugin(array $configuration = []) {
$method = $this
->getMethod(Password::class, 'prepareTarget')
->getClosure();
$configuration += [
'feed_type' => $this
->createMock(FeedTypeInterface::class),
'target_definition' => $method($this
->getMockFieldDefinition()),
];
return new Password($configuration, 'password', [], $this->passwordHasher
->reveal());
}