5 * Partial database to create broken config overrides.
7 * @see \Drupal\system\Tests\Update\ConfigOverridesUpdateTest
10 use Drupal\Core\Database\Database;
11 use Symfony\Component\Yaml\Yaml;
13 $connection = Database::getConnection();
15 // Install the incorrect override configuration.
17 // The view has field titles translated and had an addition field added,
18 // translated and then removed.
20 // The configuration has a bogus key.
23 foreach ($configs as $config_name) {
24 $config = Yaml::parse(file_get_contents(__DIR__ . '/es-' . $config_name . '.yml'));
25 $connection->delete('config')
26 ->condition('name', $config_name)
27 ->condition('collection', 'language.es')
29 $connection->insert('config')
30 ->fields(['data', 'name', 'collection'])
32 'name' => $config_name,
33 'data' => serialize($config),
34 'collection' => 'language.es',