public function PasswordTest::setUp in Feeds 8.3
Same name in this branch
- 8.3 tests/src/Functional/Feeds/Target/PasswordTest.php \Drupal\Tests\feeds\Functional\Feeds\Target\PasswordTest::setUp()
- 8.3 tests/src/Unit/Feeds/Target/PasswordTest.php \Drupal\Tests\feeds\Unit\Feeds\Target\PasswordTest::setUp()
Overrides FeedsBrowserTestBase::setUp
File
- tests/
src/ Functional/ Feeds/ Target/ PasswordTest.php, line 40
Class
- PasswordTest
- @coversDefaultClass \Drupal\feeds\Feeds\Target\Password @group feeds
Namespace
Drupal\Tests\feeds\Functional\Feeds\TargetCode
public function setUp() {
parent::setUp();
// Create a feed type for importing users with passwords.
$this->feedType = $this
->createFeedTypeForCsv([
'name' => 'name',
'mail' => 'mail',
'status' => 'status',
], [
'processor' => 'entity:user',
'processor_configuration' => [
'authorize' => FALSE,
'update_existing' => ProcessorInterface::UPDATE_EXISTING,
],
'mappings' => [
[
'target' => 'name',
'map' => [
'value' => 'name',
],
],
[
'target' => 'mail',
'map' => [
'value' => 'mail',
],
'unique' => [
'value' => TRUE,
],
],
[
'target' => 'status',
'map' => [
'value' => 'status',
],
],
],
]);
$this->userStorage = $this->container
->get('entity_type.manager')
->getStorage('user');
}