makeNodeMigrateMapTable example


  protected function getMissingPaths() {
    return [];
  }

  /** * Tests node classic migration via the UI. */
  public function testNodeClassicUpgrade() {
    // Add a node classic migrate table to d8.     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '6');

    // Start the upgrade process.     $this->submitCredentialForm();

    // Confirm there are only classic node migration map tables. This shows     // that only the classic migration will run.     $results = $this->nodeMigrateMapTableCount('6');
    $this->assertSame(14, $results['node']);
    $this->assertSame(0, $results['node_complete']);
  }

}
'telephone',
    'text',
  ];

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    // Add a node classic migrate table to the destination site so that tests     // run by default with the classic node migrations.     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '6');
    $this->loadFixture($this->getFixtureFilePath());
  }

  /** * Gets the path to the fixture file. */
  protected function getFixtureFilePath() {
    return __DIR__ . '/../../../fixtures/drupal6.php';
  }

  /** * Executes all user migrations. * * @param bool $include_pictures * If TRUE, migrates user pictures. */
abstract class MigrateDrupalTestBase extends CoreMigrateDrupalTestBase {

  use NodeMigrateTypeTestTrait;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    // Add a node classic migrate table to the destination site so that tests     // run by default with the classic node migrations.     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '7');
    $this->loadFixture($this->getFixtureFilePath());
  }

  /** * Gets the path to the fixture file. */
  protected function getFixtureFilePath() {
    return __DIR__ . '/../../../../fixtures/drupal7.php';
  }

  /** * Executes all user migrations. * * @param bool $include_pictures * (optional) If TRUE, migrates user pictures. Defaults to TRUE. */

  public function testMigrationPluginAlter($type, array $migration_definitions, array $expected) {
    $this->makeNodeMigrateMapTable($type, '7');
    migrate_drupal_migration_plugins_alter($migration_definitions);
    $this->assertSame($expected$migration_definitions);
  }

  /** * Data provider for testMigrationPluginAlter(). */
  public function providerMigrationPluginAlter() {
    $tests = [];

    $migrations = [
      
abstract class MigrateDrupal7TestBase extends MigrateDrupalTestBase {

  use NodeMigrateTypeTestTrait;

  /** * {@inheritdoc} */
  protected function setUp(): void {
    parent::setUp();
    // Add a node classic migrate table to the destination site so that tests     // run by default with the classic node migrations.     $this->makeNodeMigrateMapTable(NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC, '7');
    $this->loadFixture($this->getFixtureFilePath());
  }

  /** * Gets the path to the fixture file. */
  protected function getFixtureFilePath() {
    return __DIR__ . '/../../../fixtures/drupal7.php';
  }

  /** * Executes all field migrations. */
Home | Imprint | This part of the site doesn't use cookies.