3 namespace Drupal\Tests\user\Kernel\Plugin\migrate\source\d7;
5 use Drupal\Tests\migrate\Kernel\MigrateSqlSourceTestBase;
8 * Tests the d7_user source plugin.
10 * @covers \Drupal\user\Plugin\migrate\source\d7\User
13 class UserTest extends MigrateSqlSourceTestBase {
18 public static $modules = ['user', 'migrate_drupal'];
23 public function providerSource() {
27 $tests[0]['source_data']['field_config'] = [
30 'translatable' => '0',
33 $tests[0]['source_data']['field_config_instance'] = [
37 'field_name' => 'field_file',
38 'entity_type' => 'user',
44 $tests[0]['source_data']['field_data_field_file'] = [
46 'entity_type' => 'user',
50 'revision_id' => NULL,
53 'field_file_fid' => 99,
54 'field_file_display' => 1,
55 'field_file_description' => 'None',
58 $tests[0]['source_data']['role'] = [
61 'name' => 'authenticated user',
65 $tests[0]['source_data']['users'] = [
69 'pass' => '$S$DVpvPItXvnsmF3giVEe7Jy2lG.SCoEs8uKwpHsyPvdeNAaNZYxZ8',
70 'mail' => 'odo@local.host',
73 'signature_format' => 'filtered_html',
74 'created' => '1432750741',
78 'timezone' => 'America/Chicago',
81 'init' => 'odo@local.host',
82 'data' => 'a:1:{s:7:"contact";i:1;}',
85 $tests[0]['source_data']['users_roles'] = [
92 // The expected results.
93 $tests[0]['expected_data'] = [
97 'pass' => '$S$DVpvPItXvnsmF3giVEe7Jy2lG.SCoEs8uKwpHsyPvdeNAaNZYxZ8',
98 'mail' => 'odo@local.host',
100 'signature_format' => 'filtered_html',
101 'created' => '1432750741',
105 'timezone' => 'America/Chicago',
108 'init' => 'odo@local.host',
117 'description' => 'None',