You are here

public function UserMigrationBuilderTest::testBuilder in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/Migrate/d7/UserMigrationBuilderTest.php \Drupal\user\Tests\Migrate\d7\UserMigrationBuilderTest::testBuilder()

Tests that profile fields are merged into the d6_profile_values migration's process pipeline by the d6_profile_values builder.

File

core/modules/user/src/Tests/Migrate/d7/UserMigrationBuilderTest.php, line 21
Contains \Drupal\user\Tests\Migrate\d7\UserMigrationBuilderTest.

Class

UserMigrationBuilderTest
@group user

Namespace

Drupal\user\Tests\Migrate\d7

Code

public function testBuilder() {
  $template = \Drupal::service('migrate.template_storage')
    ->getTemplateByName('d7_user');

  /** @var \Drupal\migrate\Entity\MigrationInterface[] $migrations */
  $migrations = \Drupal::service('plugin.manager.migrate.builder')
    ->createInstance('d7_user')
    ->buildMigrations($template);
  $this
    ->assertIdentical('d7_user', $migrations[0]
    ->id());
  $process = $migrations[0]
    ->getProcess();
  $this
    ->assertIdentical('field_file', $process['field_file'][0]['source']);
}