drupal-8.remove_handler_submit_setting-2715589.php in Drupal 8
Provides necessary database additions for testing field_post_update_remove_handler_submit_setting()
File
core/modules/field/tests/fixtures/update/drupal-8.remove_handler_submit_setting-2715589.phpView source
<?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();