Version 1
[yaffs-website] / web / core / modules / migrate_drupal / tests / src / Kernel / CckFieldBackwardsCompatibilityTest.php
diff --git a/web/core/modules/migrate_drupal/tests/src/Kernel/CckFieldBackwardsCompatibilityTest.php b/web/core/modules/migrate_drupal/tests/src/Kernel/CckFieldBackwardsCompatibilityTest.php
new file mode 100644 (file)
index 0000000..11dceec
--- /dev/null
@@ -0,0 +1,29 @@
+<?php
+
+namespace Drupal\Tests\migrate_drupal\Kernel;
+
+use Drupal\migrate_field_plugin_manager_test\Plugin\migrate\cckfield\d6\FileField;
+use Drupal\Tests\migrate_drupal\Kernel\d6\MigrateDrupal6TestBase;
+
+/**
+ * @group migrate_drupal
+ */
+class CckFieldBackwardsCompatibilityTest extends MigrateDrupal6TestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['file', 'migrate_field_plugin_manager_test'];
+
+  /**
+   * Ensures that the cckfield backwards compatibility layer is invoked.
+   */
+  public function testBackwardsCompatibility() {
+    $migration = $this->container
+      ->get('plugin.manager.migration')
+      ->getDefinition('d6_node:story');
+
+    $this->assertSame(FileField::class, $migration['process']['field_test_filefield']['class']);
+  }
+
+}