ckeditor5-3259593.php

Same filename in other branches
  1. 9 core/modules/ckeditor5/tests/fixtures/update/ckeditor5-3259593.php
  2. 11.x core/modules/ckeditor5/tests/fixtures/update/ckeditor5-3259593.php

Test fixture.

File

core/modules/ckeditor5/tests/fixtures/update/ckeditor5-3259593.php

View source
<?php


/**
 * @file
 * Test fixture.
 */
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Update core.extension.
$extensions = $connection->select('config')
    ->fields('config', [
    'data',
])
    ->condition('collection', '')
    ->condition('name', 'core.extension')
    ->execute()
    ->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['ckeditor5'] = 0;
$connection->update('config')
    ->fields([
    'data' => serialize($extensions),
])
    ->condition('collection', '')
    ->condition('name', 'core.extension')
    ->execute();
$test_format_format = Yaml::decode(file_get_contents(__DIR__ . '/filter.format.test_format.yml'));
$connection->insert('config')
    ->fields([
    'collection',
    'name',
    'data',
])
    ->values([
    'collection' => '',
    'name' => 'filter.format.test_format',
    'data' => serialize($test_format_format),
])
    ->execute();
$test_format_editor = Yaml::decode(file_get_contents(__DIR__ . '/editor.editor.test_format.yml'));
$connection->insert('config')
    ->fields([
    'collection',
    'name',
    'data',
])
    ->values([
    'collection' => '',
    'name' => 'editor.editor.test_format',
    'data' => serialize($test_format_editor),
])
    ->execute();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.