migrationDefinition example

$this->assertCount($ids_count_expected$ids);
  }

  /** * Tests user source plugin. * * @dataProvider migrationConfigurationProvider */
  public function testUserSource(array $configuration) {
    $migration = $this->migrationPluginManager
      ->createStubMigration($this->migrationDefinition('content_entity:user', $configuration));
    $user_source = $migration->getSourcePlugin();
    $this->assertSame('users', $user_source->__toString());
    if (!$configuration['include_translations']) {
      // Confirm that the anonymous user is in the source database but not       // included in the rows returned by the content_entity.       $this->assertNotNull(User::load(0));
      $this->assertEquals(1, $user_source->count());
    }
    $this->assertIds($user_source$configuration);
    $fields = $user_source->fields();
    $this->assertArrayHasKey('name', $fields);
    
Home | Imprint | This part of the site doesn't use cookies.