MigrateDrupal6TestBase.php

Same filename in this branch
  1. 9 core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
Same filename in other branches
  1. 8.9.x core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
  2. 10 core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php
  3. 11.x core/modules/migrate_drupal/tests/src/Kernel/d6/MigrateDrupal6TestBase.php

Namespace

Drupal\Tests\aggregator\Kernel\Migrate\d6

File

core/modules/aggregator/tests/src/Kernel/Migrate/d6/MigrateDrupal6TestBase.php

View source
<?php

namespace Drupal\Tests\aggregator\Kernel\Migrate\d6;

use Drupal\migrate_drupal\NodeMigrateType;
use Drupal\Tests\migrate_drupal\Kernel\MigrateDrupalTestBase;
use Drupal\Tests\migrate_drupal\Traits\NodeMigrateTypeTestTrait;

/**
 * Base class for Drupal 6 migration tests.
 */
abstract class MigrateDrupal6TestBase extends MigrateDrupalTestBase {
    use NodeMigrateTypeTestTrait;
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'aggregator',
    ];
    
    /**
     * {@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';
    }

}

Classes

Title Deprecated Summary
MigrateDrupal6TestBase Base class for Drupal 6 migration tests.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.