function SourceModuleTest::testSourceModuleInMigration

Tests the source_module is set when not in source plugin annotation.

File

core/modules/migrate_drupal_ui/tests/src/Kernel/SourceModuleTest.php, line 26

Class

SourceModuleTest
Tests source_module selection.

Namespace

Drupal\Tests\migrate_drupal_ui\Kernel

Code

public function testSourceModuleInMigration() : void {
  $this->expectDeprecation('Class "Drupal\\migrate_drupal\\Plugin\\migrate\\source\\DrupalSqlBase" as extended by "Drupal\\migration_source_module_test\\Plugin\\migrate\\source\\NoSourceModule" is deprecated in drupal:11.3.0 and is removed from drupal:12.0.0. There is no replacement. See https://www.drupal.org/node/3533564');
  $migration = \Drupal::service('plugin.manager.migration')->createInstance("migrate_source_module_test");
  $this->assertSame('foo', $migration->getSourcePlugin()
    ->getSourceModule());
}

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