Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / system / tests / src / Functional / Update / EntityUpdateInitialTest.php
diff --git a/web/core/modules/system/tests/src/Functional/Update/EntityUpdateInitialTest.php b/web/core/modules/system/tests/src/Functional/Update/EntityUpdateInitialTest.php
new file mode 100644 (file)
index 0000000..d4d79f9
--- /dev/null
@@ -0,0 +1,33 @@
+<?php
+
+namespace Drupal\Tests\system\Functional\Update;
+
+use Drupal\FunctionalTests\Update\UpdatePathTestBase;
+
+/**
+ * Tests handling of existing initial keys during updates.
+ *
+ * @see https://www.drupal.org/project/drupal/issues/2925550
+ *
+ * @group Update
+ */
+class EntityUpdateInitialTest extends UpdatePathTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function setDatabaseDumpFiles() {
+    $this->databaseDumpFiles = [
+      __DIR__ . '/../../../fixtures/update/drupal-8.0.0-rc1-filled.standard.entity_test_update.php.gz',
+      __DIR__ . '/../../../fixtures/update/drupal-8.entity-test-initial.php',
+    ];
+  }
+
+  /**
+   * Tests that a pre-existing initial key in the field schema is not a change.
+   */
+  public function testInitialIsIgnored() {
+    $this->runUpdates();
+  }
+
+}