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_instance'] = [
31 'field_name' => 'field_file',
32 'entity_type' => 'user',
38 $tests[0]['source_data']['field_data_field_file'] = [
40 'entity_type' => 'user',
44 'revision_id' => NULL,
47 'field_file_fid' => 99,
48 'field_file_display' => 1,
49 'field_file_description' => 'None',
52 $tests[0]['source_data']['role'] = [
55 'name' => 'authenticated user',
59 $tests[0]['source_data']['users'] = [
63 'pass' => '$S$DVpvPItXvnsmF3giVEe7Jy2lG.SCoEs8uKwpHsyPvdeNAaNZYxZ8',
64 'mail' => 'odo@local.host',
67 'signature_format' => 'filtered_html',
68 'created' => '1432750741',
72 'timezone' => 'America/Chicago',
75 'init' => 'odo@local.host',
76 'data' => 'a:1:{s:7:"contact";i:1;}',
79 $tests[0]['source_data']['users_roles'] = [
86 // The expected results.
87 $tests[0]['expected_data'] = [
91 'pass' => '$S$DVpvPItXvnsmF3giVEe7Jy2lG.SCoEs8uKwpHsyPvdeNAaNZYxZ8',
92 'mail' => 'odo@local.host',
94 'signature_format' => 'filtered_html',
95 'created' => '1432750741',
99 'timezone' => 'America/Chicago',
102 'init' => 'odo@local.host',
111 'description' => 'None',