Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / field / tests / fixtures / update / drupal-8.remove_handler_submit_setting-2715589.php
diff --git a/web/core/modules/field/tests/fixtures/update/drupal-8.remove_handler_submit_setting-2715589.php b/web/core/modules/field/tests/fixtures/update/drupal-8.remove_handler_submit_setting-2715589.php
new file mode 100644 (file)
index 0000000..88a543f
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+
+/**
+ * @file
+ * Provides necessary database additions for testing
+ * field_post_update_remove_handler_submit_setting()
+ */
+
+use Drupal\Core\Database\Database;
+
+$connection = Database::getConnection();
+
+$config = unserialize($connection->select('config', 'c')
+  ->fields('c', ['data'])
+  ->condition('collection', '')
+  ->condition('name', 'field.field.node.article.field_tags')
+  ->execute()
+  ->fetchField());
+
+$config['settings']['handler_submit'] = 'Change handler';
+
+$connection->update('config')
+  ->fields(['data' => serialize($config)])
+  ->condition('collection', '')
+  ->condition('name', 'field.field.node.article.field_tags')
+  ->execute();