function MigrateSqlIdMapTest::testGetMigrationPluginManagerDeprecation

Same name and namespace in other branches
  1. 10 core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php \Drupal\Tests\migrate\Unit\MigrateSqlIdMapTest::testGetMigrationPluginManagerDeprecation()

Tests deprecation message from Sql::getMigrationPluginManager().

@group legacy

File

core/modules/migrate/tests/src/Unit/MigrateSqlIdMapTest.php, line 1187

Class

MigrateSqlIdMapTest
Tests the SQL ID map plugin.

Namespace

Drupal\Tests\migrate\Unit

Code

public function testGetMigrationPluginManagerDeprecation() {
    $container = new ContainerBuilder();
    $migration_plugin_manager = $this->createMock(MigrationPluginManager::class);
    $container->set('plugin.manager.migration', $migration_plugin_manager);
    \Drupal::setContainer($container);
    $this->expectDeprecation('deprecated in drupal:9.5.0 and is removed from drupal:11.0.0. Use $this->migrationPluginManager instead. See https://www.drupal.org/node/3277306');
    $id_map = $this->getIdMap();
    $id_map->getMigrationPluginManager();
}

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