You are here

protected function MigrateDrupal7TestBase::migrateUsers in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php \Drupal\Tests\migrate_drupal\Kernel\d7\MigrateDrupal7TestBase::migrateUsers()

Executes all user migrations.

Parameters

bool $include_pictures: (optional) If TRUE, migrates user pictures. Defaults to TRUE.

15 calls to MigrateDrupal7TestBase::migrateUsers()
FollowUpMigrationsTest::setUp in core/modules/migrate_drupal/tests/src/Kernel/d7/FollowUpMigrationsTest.php
MigrateBookTest::setUp in core/modules/book/tests/src/Kernel/Migrate/d7/MigrateBookTest.php
MigrateDrupal7TestBase::migrateContent in core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php
Executes all content migrations.
MigrateMenuLinkTest::setUp in core/modules/menu_link_content/tests/src/Kernel/Migrate/d7/MigrateMenuLinkTest.php
MigrateNodeCompleteTest::setUp in core/modules/node/tests/src/Kernel/Migrate/d7/MigrateNodeCompleteTest.php

... See full list

File

core/modules/migrate_drupal/tests/src/Kernel/d7/MigrateDrupal7TestBase.php, line 50

Class

MigrateDrupal7TestBase
Base class for Drupal 7 migration tests.

Namespace

Drupal\Tests\migrate_drupal\Kernel\d7

Code

protected function migrateUsers($include_pictures = TRUE) {
  $migrations = [
    'd7_user_role',
    'd7_user',
  ];
  if ($include_pictures) {

    // Prepare to migrate user pictures as well.
    $this
      ->installEntitySchema('file');
    $migrations = array_merge([
      'user_picture_field',
      'user_picture_field_instance',
    ], $migrations);
  }
  $this
    ->executeMigrations($migrations);
}