You are here

public function ProfileValuesBuilderTest::testBuilder in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Tests/Migrate/d6/ProfileValuesBuilderTest.php \Drupal\user\Tests\Migrate\d6\ProfileValuesBuilderTest::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/d6/ProfileValuesBuilderTest.php, line 21
Contains \Drupal\user\Tests\Migrate\d6\ProfileValuesBuilderTest.

Class

ProfileValuesBuilderTest
@group user

Namespace

Drupal\user\Tests\Migrate\d6

Code

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

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