MigrateDependenciesTest.php

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

Namespace

Drupal\Tests\aggregator\Kernel\Migrate\d6

File

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

View source
<?php

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

use Drupal\Component\Render\FormattableMarkup;
use Drupal\migrate\MigrateExecutable;

/**
 * Ensure the consistency among the dependencies for migrate.
 *
 * @group aggregator
 * @group legacy
 */
class MigrateDependenciesTest extends MigrateDrupal6TestBase {
    
    /**
     * {@inheritdoc}
     */
    protected static $modules = [
        'aggregator',
    ];
    
    /**
     * Tests dependencies on the migration of aggregator feeds & items.
     */
    public function testAggregatorMigrateDependencies() {
        
        /** @var \Drupal\migrate\Plugin\Migration $migration */
        $migration = $this->getMigration('d6_aggregator_item');
        $executable = new MigrateExecutable($migration, $this);
        $this->startCollectingMessages();
        $executable->import();
        $this->assertEquals([
            new FormattableMarkup('Migration @id did not meet the requirements. Missing migrations d6_aggregator_feed. requirements: d6_aggregator_feed.', [
                '@id' => $migration->id(),
            ]),
        ], $this->migrateMessages['error']);
    }

}

Classes

Title Deprecated Summary
MigrateDependenciesTest Ensure the consistency among the dependencies for migrate.

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