class TestMigration

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\TestMigration
  2. 8.9.x core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\TestMigration
  3. 10 core/modules/migrate/tests/src/Unit/MigrationTest.php \Drupal\Tests\migrate\Unit\TestMigration

Defines the TestMigration class.

Hierarchy

  • class \Drupal\Tests\migrate\Unit\TestMigration extends \Drupal\migrate\Plugin\Migration

Expanded class hierarchy of TestMigration

File

core/modules/migrate/tests/src/Unit/MigrationTest.php, line 257

Namespace

Drupal\Tests\migrate\Unit
View source
class TestMigration extends Migration {
    
    /**
     * Constructs an instance of TestMigration object.
     */
    public function __construct() {
        $this->migration_dependencies = ($this->migration_dependencies ?: []) + [
            'required' => [],
            'optional' => [],
        ];
    }
    
    /**
     * Sets the migration ID (machine name).
     *
     * @param string $plugin_id
     *   The plugin ID of the plugin instance.
     */
    public function setPluginId($plugin_id) : void {
        $this->pluginId = $plugin_id;
    }
    
    /**
     * Sets the requirements values.
     *
     * @param array $requirements
     *   The array of requirement values.
     */
    public function setRequirements(array $requirements) : void {
        $this->requirements = $requirements;
    }
    
    /**
     * Sets the source Plugin.
     *
     * @param \Drupal\migrate\Plugin\MigrateSourceInterface $source_plugin
     *   The source Plugin.
     */
    public function setSourcePlugin(MigrateSourceInterface $source_plugin) : void {
        $this->sourcePlugin = $source_plugin;
    }
    
    /**
     * Sets the destination Plugin.
     *
     * @param \Drupal\migrate\Plugin\MigrateDestinationInterface $destination_plugin
     *   The destination Plugin.
     */
    public function setDestinationPlugin(MigrateDestinationInterface $destination_plugin) : void {
        $this->destinationPlugin = $destination_plugin;
    }
    
    /**
     * Sets the plugin manager service.
     *
     * @param \Drupal\migrate\Plugin\MigrationPluginManagerInterface $plugin_manager
     *   The plugin manager service.
     */
    public function setMigrationPluginManager(MigrationPluginManagerInterface $plugin_manager) : void {
        $this->migrationPluginManager = $plugin_manager;
    }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title Overrides
DerivativeInspectionInterface::getBaseId public function Gets the base_plugin_id of the plugin instance. 1
DerivativeInspectionInterface::getDerivativeId public function Gets the derivative_id of the plugin instance. 1
Migration::$audit protected property Whether the migration is auditable.
Migration::$destination protected property The destination configuration, with at least a 'plugin' key.
Migration::$destinationIds protected property The destination identifiers.
Migration::$destinationPlugin protected property The destination plugin.
Migration::$destinationPluginManager protected property The destination plugin manager.
Migration::$id protected property The migration ID (machine name). 1
Migration::$idMap protected property The identifier map data.
Migration::$idMapPlugin protected property The identifier map.
Migration::$idMapPluginManager protected property The ID map plugin manager.
Migration::$label protected property The human-readable label for the migration.
Migration::$migrationPluginManager protected property The migration plugin manager for loading other migration plugins.
Migration::$migration_dependencies protected property
Migration::$migration_tags protected property
Migration::$process protected property The configuration describing the process plugins.
Migration::$processPluginManager protected property The process plugin manager.
Migration::$processPlugins protected property The cached process plugins.
Migration::$requirements protected property These migrations must be already executed before this migration can run.
Migration::$source protected property The source configuration, with at least a 'plugin' key.
Migration::$sourcePlugin protected property The source plugin.
Migration::$sourcePluginManager protected property The source plugin manager.
Migration::$sourceRowStatus protected property The source_row_status for the current map row.
Migration::$statusLabels protected property Labels corresponding to each defined status.
Migration::allRowsProcessed public function Overrides MigrationInterface::allRowsProcessed
Migration::checkRequirements public function Overrides RequirementsInterface::checkRequirements
Migration::clearInterruptionResult public function Overrides MigrationInterface::clearInterruptionResult
Migration::create public static function Overrides ContainerFactoryPluginInterface::create 1
Migration::findMigrationDependencies protected function Find migration dependencies from migration_lookup and sub_process plugins.
Migration::getDestinationConfiguration public function Overrides MigrationInterface::getDestinationConfiguration
Migration::getDestinationIds public function Overrides MigrationInterface::getDestinationIds
Migration::getDestinationPlugin public function Overrides MigrationInterface::getDestinationPlugin
Migration::getIdMap public function Overrides MigrationInterface::getIdMap
Migration::getIdMapPlugin public function Retrieves the ID map plugin.
Migration::getInterruptionResult public function Overrides MigrationInterface::getInterruptionResult
Migration::getMigrationDependencies public function Get the dependencies for this migration. Overrides MigrationInterface::getMigrationDependencies 1
Migration::getMigrationPluginManager protected function Gets the migration plugin manager.
Migration::getMigrationTags public function Overrides MigrationInterface::getMigrationTags
Migration::getPluginDefinition public function Overrides PluginInspectionInterface::getPluginDefinition
Migration::getProcess public function Overrides MigrationInterface::getProcess 2
Migration::getProcessNormalized protected function Resolve shorthands into a list of plugin configurations.
Migration::getProcessPlugins public function Overrides MigrationInterface::getProcessPlugins
Migration::getRequirements public function Overrides MigrationInterface::getRequirements
Migration::getSourceConfiguration public function Overrides MigrationInterface::getSourceConfiguration
Migration::getSourcePlugin public function Overrides MigrationInterface::getSourcePlugin
Migration::getStatus public function Overrides MigrationInterface::getStatus
Migration::getStatusLabel public function Overrides MigrationInterface::getStatusLabel
Migration::id public function Overrides MigrationInterface::id 1
Migration::interruptMigration public function Overrides MigrationInterface::interruptMigration
Migration::isAuditable public function Overrides MigrationInterface::isAuditable
Migration::label public function Overrides MigrationInterface::label
Migration::mergeProcessOfProperty public function Overrides MigrationInterface::mergeProcessOfProperty
Migration::set public function 1
Migration::setProcess public function Overrides MigrationInterface::setProcess
Migration::setProcessOfProperty public function Overrides MigrationInterface::setProcessOfProperty
Migration::setStatus public function Overrides MigrationInterface::setStatus
MigrationInterface::MESSAGE_ERROR constant Migration error.
MigrationInterface::MESSAGE_INFORMATIONAL constant Migration info.
MigrationInterface::MESSAGE_NOTICE constant Migration notice.
MigrationInterface::MESSAGE_WARNING constant Migration warning.
MigrationInterface::RESULT_COMPLETED constant All records have been processed.
MigrationInterface::RESULT_DISABLED constant This migration is disabled, skipping.
MigrationInterface::RESULT_FAILED constant The process had a fatal error.
MigrationInterface::RESULT_INCOMPLETE constant The process has stopped itself (e.g., the memory limit is approaching).
MigrationInterface::RESULT_SKIPPED constant Dependencies are unfulfilled - skip the process.
MigrationInterface::RESULT_STOPPED constant The process was stopped externally (e.g., via drush migrate-stop).
MigrationInterface::STATUS_DISABLED constant The migration has been disabled.
MigrationInterface::STATUS_IDLE constant The migration is currently not running.
MigrationInterface::STATUS_IMPORTING constant The migration is currently importing.
MigrationInterface::STATUS_ROLLING_BACK constant The migration is currently being rolled back.
MigrationInterface::STATUS_STOPPING constant The migration is being stopped.
PluginInspectionInterface::getPluginId public function Gets the plugin ID of the plugin instance. 2
TestMigration::setDestinationPlugin public function Sets the destination Plugin.
TestMigration::setMigrationPluginManager public function Sets the plugin manager service.
TestMigration::setPluginId public function Sets the migration ID (machine name).
TestMigration::setRequirements public function Sets the requirements values.
TestMigration::setSourcePlugin public function Sets the source Plugin.
TestMigration::__construct public function Constructs an instance of TestMigration object. Overrides Migration::__construct

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