use Drupal\KernelTests\KernelTestBase;
use Drupal\migrate_plus\Entity\Migration;
-use Drupal\migrate_plus\Plugin\MigrationConfigEntityPluginManager;
/**
* Test migration config entity discovery.
public static $modules = ['migrate', 'migrate_plus'];
/**
- * @var MigrationConfigEntityPluginManager
+ * @var \Drupal\migrate\Plugin\MigrationPluginManager
*/
- protected $pluginMananger;
+ protected $pluginManager;
protected function setUp() {
parent::setUp();
- $this->pluginMananger = \Drupal::service('plugin.manager.config_entity_migration');
+ $this->pluginManager = \Drupal::service('plugin.manager.migration');
}
public function testCacheInvalidation() {
]);
$config->save();
- $this->assertTrue($this->pluginMananger->getDefinition('test'));
- $this->assertSame('Label A', $this->pluginMananger->getDefinition('test')['label']);
+ $this->assertTrue($this->pluginManager->getDefinition('test'));
+ $this->assertSame('Label A', $this->pluginManager->getDefinition('test')['label']);
// Clear static cache in the plugin manager, the cache tag take care of the
// persistent cache.
- $this->pluginMananger->useCaches(FALSE);
- $this->pluginMananger->useCaches(TRUE);
+ $this->pluginManager->useCaches(FALSE);
+ $this->pluginManager->useCaches(TRUE);
$config->set('label', 'Label B');
$config->save();
- $this->assertSame('Label B', $this->pluginMananger->getDefinition('test')['label']);
- $this->assertSame('Label B', \Drupal::service('plugin.manager.migration')->getDefinition('test')['label']);
+ $this->assertSame('Label B', $this->pluginManager->getDefinition('test')['label']);
}
}