Yaffs site version 1.1
[yaffs-website] / web / modules / contrib / migrate_plus / tests / src / Kernel / MigrationConfigEntityTest.php
index f309df4a9ebafd1ab3bfbc37813057c87b9bd5a4..386363a36593458cfb445bd56f1fbaab4b7b9da5 100644 (file)
@@ -4,7 +4,6 @@ namespace Drupal\Tests\migrate_plus\Kernel;
 
 use Drupal\KernelTests\KernelTestBase;
 use Drupal\migrate_plus\Entity\Migration;
-use Drupal\migrate_plus\Plugin\MigrationConfigEntityPluginManager;
 
 /**
  * Test migration config entity discovery.
@@ -16,13 +15,13 @@ class MigrationConfigEntityTest extends KernelTestBase {
   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() {
@@ -36,19 +35,18 @@ class MigrationConfigEntityTest extends KernelTestBase {
     ]);
     $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']);
   }
 
 }