You are here

public function MigrateDependenciesTest::testAggregatorMigrateDependencies in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php \Drupal\Tests\migrate_drupal\Kernel\dependencies\MigrateDependenciesTest::testAggregatorMigrateDependencies()

Tests dependencies on the migration of aggregator feeds & items.

File

core/modules/migrate_drupal/tests/src/Kernel/dependencies/MigrateDependenciesTest.php, line 97

Class

MigrateDependenciesTest
Ensure the consistency among the dependencies for migrate.

Namespace

Drupal\Tests\migrate_drupal\Kernel\dependencies

Code

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
    ->assertEqual($this->migrateMessages['error'], [
    new FormattableMarkup('Migration @id did not meet the requirements. Missing migrations d6_aggregator_feed. requirements: d6_aggregator_feed.', [
      '@id' => $migration
        ->id(),
    ]),
  ]);
  $this->collectMessages = FALSE;
}