Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / field / tests / src / Unit / Plugin / migrate / process / FieldTypeDefaultsTest.php
diff --git a/web/core/modules/field/tests/src/Unit/Plugin/migrate/process/FieldTypeDefaultsTest.php b/web/core/modules/field/tests/src/Unit/Plugin/migrate/process/FieldTypeDefaultsTest.php
new file mode 100644 (file)
index 0000000..31c8cb1
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+namespace Drupal\Tests\field\Unit\Plugin\migrate\process;
+
+use Drupal\field\Plugin\migrate\process\FieldTypeDefaults;
+use Drupal\Tests\migrate\Unit\process\MigrateProcessTestCase;
+
+/**
+ * Tests the deprecation of the field_type_defaults process plugin.
+ *
+ * @coversDefaultClass \Drupal\field\Plugin\migrate\process\FieldTypeDefaults
+ * @group field
+ * @group legacy
+ */
+class FieldTypeDefaultsTest extends MigrateProcessTestCase {
+
+  /**
+   * Tests that the field_type_defaults plugin triggers a deprecation error.
+   *
+   * @expectedDeprecation The field_type_defaults process plugin is deprecated in Drupal 8.6.0 and will be removed before Drupal 9.0.0. Use d6_field_type_defaults or d7_field_type_defaults instead. See https://www.drupal.org/node/2944589.
+   */
+  public function testDeprecatedError() {
+    $this->plugin = new FieldTypeDefaults([], 'field_type_defaults', []);
+  }
+
+}