first commit

This commit is contained in:
2020-06-08 23:57:36 +02:00
commit 6277454f7a
16057 changed files with 1715382 additions and 0 deletions
@@ -0,0 +1,6 @@
/**
* This file is for testing CSS file override in
* CascadingStylesheetsTestCase::testRenderOverride().
* No contents are necessary.
*/
@@ -0,0 +1,24 @@
uuid: C499B41D-035E-432E-9462-36410C43C49F
langcode: en
status: true
dependencies:
module:
- search
theme:
- bartik
id: secondtestfor2354889
theme: bartik
region: sidebar_first
weight: -6
provider: null
plugin: search_form_block
settings:
id: search_form_block
label: Search
provider: search
label_display: visible
page_id: node_search
cache:
max_age: -1
status: true
visibility: { }
@@ -0,0 +1,18 @@
uuid: 3c4e92c3-5fb1-408d-993c-6066559230be
langcode: en
status: true
dependencies:
theme:
- bartik
id: pagetitle_2
theme: bartik
region: '-1'
weight: null
provider: null
plugin: page_title_block
settings:
id: page_title_block
label: 'Page title'
provider: core
label_display: '0'
visibility: { }
@@ -0,0 +1,25 @@
uuid: b299258f-6fb5-47f8-b42f-473787d02e22
langcode: en
status: true
dependencies:
module:
- system
theme:
- bartik
id: bartik_branding
theme: bartik
region: header
weight: 0
provider: null
plugin: system_branding_block
settings:
id: system_branding_block
label: 'Site branding'
provider: system
label_display: '0'
cache:
max_age: -1
use_site_logo: true
use_site_name: true
use_site_slogan: true
visibility: { }
@@ -0,0 +1,51 @@
uuid: 9d204071-a923-4707-8200-c298a540fb0c
langcode: en
status: true
dependencies:
content:
- 'block_content:basic:c1895145-893e-460b-a24e-78cd2cefbb1f'
module:
- block_content
- node
- user
theme:
- bartik
id: testfor2354889
theme: bartik
region: content
weight: -6
provider: null
plugin: 'block_content:c1895145-893e-460b-a24e-78cd2cefbb1f'
settings:
id: 'block_content:c1895145-893e-460b-a24e-78cd2cefbb1f'
label: 'Test for 2354889'
provider: block_content
label_display: visible
cache:
max_age: -1
status: true
info: ''
view_mode: full
visibility:
node_type:
id: node_type
bundles:
page: page
negate: false
context_mapping:
node: node.node
user_role:
id: user_role
roles:
authenticated: authenticated
negate: false
context_mapping:
user: user.current_user
language:
id: language
langcodes:
en: en
de: de
negate: false
context_mapping:
language: language.language_interface
@@ -0,0 +1,17 @@
langcode: en
status: true
dependencies:
theme:
- bartik
id: bartik_page_title
theme: bartik
region: content
weight: -50
provider: null
plugin: page_title_block
settings:
id: page_title_block
label: 'Page title'
provider: core
label_display: '0'
visibility: { }
@@ -0,0 +1,18 @@
uuid: 87097da9-29d1-441f-8b00-b93852c760d6
langcode: en
status: false
dependencies:
theme:
- bartik
id: pagetitle_1
theme: bartik
region: '-1'
weight: -8
provider: null
plugin: page_title_block
settings:
id: page_title_block
label: 'Page title'
provider: core
label_display: '0'
visibility: { }
@@ -0,0 +1,19 @@
langcode: en
status: true
dependencies:
theme:
- seven
id: seven_secondary_local_tasks
theme: seven
region: pre_content
weight: 0
provider: null
plugin: local_tasks_block
settings:
id: local_tasks_block
label: 'Secondary tabs'
provider: core
label_display: '0'
primary: false
secondary: true
visibility: { }
@@ -0,0 +1,20 @@
uuid: ee7c230c-337b-4e8f-8600-d65bfd34f171
langcode: en
status: true
dependencies:
theme:
- seven
id: seven_local_actions
theme: seven
region: content
weight: -10
provider: null
plugin: local_actions_block
settings:
id: local_actions_block
label: 'Primary admin actions'
label_display: '0'
cache:
max_age: 0
status: true
visibility: { }
@@ -0,0 +1,30 @@
uuid: 4558907D-2918-48FE-B56F-8A007B5FBDD5
langcode: en
status: true
dependencies:
module:
- user
theme:
- bartik
id: thirdtestfor2354889
theme: bartik
region: sidebar_first
weight: -6
provider: null
plugin: user_login_block
settings:
id: user_login_block
label: 'User login'
provider: user
label_display: visible
cache:
max_age: -1
status: true
visibility:
node_type:
id: node_type
bundles:
page: page
negate: false
context_mapping:
baloney: baloney_spam
@@ -0,0 +1,47 @@
<?php
/**
* @file
* Contains database additions to for testing upgrade path for action plugins.
*
* @see https://www.drupal.org/node/2815379
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of configured email, goto, and message actions.
$actions[] = Yaml::decode(file_get_contents(__DIR__ . '/system.action.goto_2815379.yml'));
$actions[] = Yaml::decode(file_get_contents(__DIR__ . '/system.action.message_2815379.yml'));
$actions[] = Yaml::decode(file_get_contents(__DIR__ . '/system.action.send_email_2815379.yml'));
foreach ($actions as $action) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'system.action.' . $action['id'],
'data' => serialize($action),
])
->execute();
}
// Enable action module.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$connection->update('config')
->fields([
'data' => serialize(array_merge_recursive($extensions, ['module' => ['action' => 0]])),
])
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,17 @@
<?php
/**
* @file
* Test fixture.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$config = unserialize($connection->query("SELECT data FROM {config} where name = :name", [':name' => 'system.theme'])->fetchField());
$config['admin'] = '0';
$connection->update('config')
->fields(['data' => serialize($config)])
->condition('name', 'system.theme')
->execute();
@@ -0,0 +1,149 @@
<?php
/**
* @file
* Partial database to mimic the uninstallation of the block_content module.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$connection->schema()->dropTable('block_content');
$connection->schema()->dropTable('block_content__body');
$connection->schema()->dropTable('block_content_field_data');
$connection->schema()->dropTable('block_content_field_revision');
$connection->schema()->dropTable('block_content_revision');
$connection->schema()->dropTable('block_content_revision__body');
$connection->update('config')
->condition('collection', '')
->condition('name', 'core.extension')
->fields(['data' => 'a:2:{s:6:"module";a:39:{s:5:"block";i:0;s:10:"breakpoint";i:0;s:8:"ckeditor";i:0;s:5:"color";i:0;s:7:"comment";i:0;s:6:"config";i:0;s:7:"contact";i:0;s:10:"contextual";i:0;s:8:"datetime";i:0;s:5:"dblog";i:0;s:6:"editor";i:0;s:16:"entity_reference";i:0;s:5:"field";i:0;s:8:"field_ui";i:0;s:4:"file";i:0;s:6:"filter";i:0;s:4:"help";i:0;s:7:"history";i:0;s:5:"image";i:0;s:4:"link";i:0;s:7:"menu_ui";i:0;s:4:"node";i:0;s:7:"options";i:0;s:10:"page_cache";i:0;s:4:"path";i:0;s:9:"quickedit";i:0;s:3:"rdf";i:0;s:6:"search";i:0;s:8:"shortcut";i:0;s:6:"system";i:0;s:8:"taxonomy";i:0;s:4:"text";i:0;s:7:"toolbar";i:0;s:4:"tour";i:0;s:4:"user";i:0;s:8:"views_ui";i:0;s:17:"menu_link_content";i:1;s:5:"views";i:10;s:8:"standard";i:1000;}s:5:"theme";a:3:{s:6:"classy";i:0;s:6:"bartik";i:0;s:5:"seven";i:0;}}'])
->execute();
$connection->delete('config')
->condition('name', 'block_content.type.basic')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_form_display.block_content.basic.default')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_view_display.block_content.basic.default')
->execute();
$connection->delete('config')
->condition('name', 'core.entity_view_mode.block_content.full')
->execute();
$connection->delete('config')
->condition('name', 'field.field.block_content.basic.body')
->execute();
$connection->delete('config')
->condition('name', 'field.storage.block_content.body')
->execute();
$connection->delete('config')
->condition('name', 'views.view.block_content')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.block_content_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_form_display')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_view_display')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.entity_view_mode')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.field_config')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.field_storage_config')
->condition('value', '%.block_content.%', 'LIKE')
->execute();
$connection->delete('key_value')
->condition('collection', 'config.entity.key_store.view')
->condition('value', '%.block_content"%', 'LIKE')
->execute();
$connection->update('key_value')
->condition('collection', 'entity.definitions.bundle_field_map')
->condition('name', 'block_content')
->fields(['value' => 'a:0:{}'])
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content.entity_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content.field_storage_definitions')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.definitions.installed')
->condition('name', 'block_content_type.entity_type')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.storage_schema.sql')
->condition('name', 'block_content.entity_schema_data')
->execute();
$connection->delete('key_value')
->condition('collection', 'entity.storage_schema.sql')
->condition('name', 'block_content.field_schema_data.%', 'LIKE')
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'router.path_roots')
->fields(['value' => 'a:27:{i:0;s:5:"admin";i:1;s:14:"block-category";i:2;s:7:"comment";i:3;s:8:"comments";i:4;s:7:"contact";i:5;s:4:"user";i:6;s:10:"contextual";i:7;s:6:"editor";i:8;s:4:"file";i:9;s:6:"filter";i:10;s:7:"history";i:11;s:5:"sites";i:12;s:6:"system";i:13;s:4:"node";i:14;s:9:"quickedit";i:15;s:6:"search";i:16;s:4:"cron";i:17;s:12:"machine_name";i:18;s:0:"";i:19;s:9:"<current>";i:20;s:5:"batch";i:21;s:10:"update.php";i:22;s:29:"entity_reference_autocomplete";i:23;s:8:"taxonomy";i:24;s:7:"toolbar";i:25;s:7:"rss.xml";i:26;s:5:"views";}'])
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'routing.non_admin_routes')
->fields(['value' => 'a:79:{i:0;s:27:"block.category_autocomplete";i:1;s:24:"entity.comment.edit_form";i:2;s:15:"comment.approve";i:3;s:24:"entity.comment.canonical";i:4;s:26:"entity.comment.delete_form";i:5;s:13:"comment.reply";i:6;s:31:"comment.new_comments_node_links";i:7;s:21:"comment.node_redirect";i:8;s:17:"contact.site_page";i:9;s:22:"contact.site_page_form";i:10;s:24:"entity.user.contact_form";i:11;s:17:"contextual.render";i:12;s:17:"editor.filter_xss";i:13;s:31:"editor.field_untransformed_text";i:14;s:19:"editor.image_dialog";i:15;s:18:"editor.link_dialog";i:16;s:18:"file.ajax_progress";i:17;s:15:"filter.tips_all";i:18;s:11:"filter.tips";i:19;s:26:"history.get_last_node_view";i:20;s:17:"history.read_node";i:21;s:18:"image.style_public";i:22;s:19:"image.style_private";i:23;s:13:"node.add_page";i:24;s:8:"node.add";i:25;s:19:"entity.node.preview";i:26;s:27:"entity.node.version_history";i:27;s:20:"entity.node.revision";i:28;s:28:"node.revision_revert_confirm";i:29;s:28:"node.revision_delete_confirm";i:30;s:18:"quickedit.metadata";i:31;s:21:"quickedit.attachments";i:32;s:20:"quickedit.field_form";i:33;s:21:"quickedit.entity_save";i:34;s:11:"search.view";i:35;s:23:"search.view_node_search";i:36;s:23:"search.help_node_search";i:37;s:23:"search.view_user_search";i:38;s:23:"search.help_user_search";i:39;s:19:"shortcut.set_switch";i:40;s:11:"system.ajax";i:41;s:10:"system.401";i:42;s:10:"system.403";i:43;s:10:"system.404";i:44;s:11:"system.cron";i:45;s:33:"system.machine_name_transliterate";i:46;s:12:"system.files";i:47;s:28:"system.private_file_download";i:48;s:16:"system.temporary";i:49;s:7:"<front>";i:50;s:6:"<none>";i:51;s:9:"<current>";i:52;s:15:"system.timezone";i:53;s:22:"system.batch_page.html";i:54;s:22:"system.batch_page.json";i:55;s:16:"system.db_update";i:56;s:26:"system.entity_autocomplete";i:57;s:30:"entity.taxonomy_term.edit_form";i:58;s:32:"entity.taxonomy_term.delete_form";i:59;s:16:"toolbar.subtrees";i:60;s:13:"user.register";i:61;s:11:"user.logout";i:62;s:9:"user.pass";i:63;s:9:"user.page";i:64;s:10:"user.login";i:65;s:19:"user.cancel_confirm";i:66;s:10:"user.reset";i:67;s:21:"view.frontpage.feed_1";i:68;s:21:"view.frontpage.page_1";i:69;s:25:"view.taxonomy_term.feed_1";i:70;s:25:"view.taxonomy_term.page_1";i:71;s:10:"views.ajax";i:72;s:21:"entity.node.canonical";i:73;s:23:"entity.node.delete_form";i:74;s:21:"entity.node.edit_form";i:75;s:21:"entity.user.canonical";i:76;s:21:"entity.user.edit_form";i:77;s:23:"entity.user.cancel_form";i:78;s:30:"entity.taxonomy_term.canonical";}'])
->execute();
$connection->update('key_value')
->condition('collection', 'state')
->condition('name', 'views.view_route_names')
->fields(['value' => 'a:8:{s:24:"user_admin_people.page_1";s:22:"entity.user.collection";s:20:"taxonomy_term.page_1";s:30:"entity.taxonomy_term.canonical";s:14:"content.page_1";s:20:"system.admin_content";s:12:"files.page_1";s:17:"view.files.page_1";s:12:"files.page_2";s:17:"view.files.page_2";s:16:"frontpage.feed_1";s:21:"view.frontpage.feed_1";s:16:"frontpage.page_1";s:21:"view.frontpage.page_1";s:20:"taxonomy_term.feed_1";s:25:"view.taxonomy_term.feed_1";}'])
->execute();
$connection->delete('key_value')
->condition('collection', 'system.schema')
->condition('name', 'block_content')
->execute();
$connection->delete('router')
->condition('name', 'block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.entity_form_display.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.entity_view_display.block_content.%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'entity.field_config.block_content_%', 'LIKE')
->execute();
$connection->delete('router')
->condition('name', 'field_ui.field_storage_config_add_block_content')
->execute();
$connection->delete('router')
->condition('name', 'view.block_content.page_1')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content_type.collection')
->execute();
$connection->delete('router')
->condition('name', 'entity.block_content_type.%', 'LIKE')
->execute();
@@ -0,0 +1,54 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2354889.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// A custom block with visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor2354889.yml'));
// A custom block without any visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.secondtestfor2354889.yml'));
// A custom block with visibility settings that contain a non-existing context
// mapping.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.thirdtestfor2354889.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2354889', 'block.block.secondtestfor2354889', 'block.block.thirdtestfor2354889'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute();
@@ -0,0 +1,49 @@
<?php
/**
* @file
* Partial database to mimic the installation of the block_test module.
*/
use Drupal\Core\Database\Database;
use Symfony\Component\Yaml\Yaml;
$connection = Database::getConnection();
// Set the schema version.
$connection->insert('key_value')
->fields([
'collection' => 'system.schema',
'name' => 'block_test',
'value' => 'i:8000;',
])
->execute();
// Update core.extension.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['block_test'] = 8000;
$connection->update('config')
->fields([
'data' => serialize($extensions),
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
// Install the block configuration.
$config = file_get_contents(__DIR__ . '/../../../../block/tests/modules/block_test/config/install/block.block.test_block.yml');
$config = Yaml::parse($config);
$connection->insert('config')
->fields(['data', 'name', 'collection'])
->values([
'name' => 'block.block.test_block',
'data' => serialize($config),
'collection' => '',
])
->execute();
@@ -0,0 +1,21 @@
<?php
/**
* @file
* Test fixture.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$config = unserialize($connection->query("SELECT data FROM {config} where name = :name", [':name' => 'core.extension'])->fetchField());
$config['module']['update_script_test'] = 0;
$connection->update('config')
->fields(['data' => serialize($config)])
->condition('name', 'core.extension')
->execute();
$connection->insert('key_value')
->fields(['collection' => 'system.schema', 'name' => 'update_script_test', 'value' => serialize(8000)])
->execute();
@@ -0,0 +1,37 @@
<?php
/**
* @file
* Partial database to create broken config overrides.
*
* @see \Drupal\system\Tests\Update\ConfigOverridesUpdateTest
*/
use Drupal\Core\Database\Database;
use Symfony\Component\Yaml\Yaml;
$connection = Database::getConnection();
// Install the incorrect override configuration.
$configs = [
// The view has field titles translated and had an addition field added,
// translated and then removed.
'views.view.content',
// The configuration has a bogus key.
'system.cron',
];
foreach ($configs as $config_name) {
$config = Yaml::parse(file_get_contents(__DIR__ . '/es-' . $config_name . '.yml'));
$connection->delete('config')
->condition('name', $config_name)
->condition('collection', 'language.es')
->execute();
$connection->insert('config')
->fields(['data', 'name', 'collection'])
->values([
'name' => $config_name,
'data' => serialize($config),
'collection' => 'language.es',
])
->execute();
}
@@ -0,0 +1,46 @@
<?php
// @codingStandardsIgnoreFile
/**
* @file
* Contains database additions to drupal-8.filled.standard.php.gz for testing
* the upgrade path of https://www.drupal.org/node/2336597.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Add a few more url aliases with various language codes.
$connection->insert('url_alias')
->fields([
'pid',
'source',
'alias',
'langcode',
])
->values([
'pid' => '2',
'source' => '/node/1',
'alias' => '/test-article-new-alias',
'langcode' => 'und',
])
->values([
'pid' => '3',
'source' => '/node/8',
'alias' => '/test-alias-for-any-language',
'langcode' => 'und',
])
->values([
'pid' => '4',
'source' => '/node/8',
'alias' => '/test-alias-in-english',
'langcode' => 'en',
])
->values([
'pid' => '5',
'source' => '/node/8',
'alias' => '/test-alias-in-spanish',
'langcode' => 'es',
])
->execute();
@@ -0,0 +1,39 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of editor_update_8001().
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Simulate an un-synchronized environment.
// Disable the 'basic_html' editor.
$data = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'editor.editor.basic_html')
->execute()
->fetchField();
$data = unserialize($data);
$data['status'] = FALSE;
$connection->update('config')
->fields(['data' => serialize($data)])
->condition('name', 'editor.editor.basic_html')
->execute();
// Disable the 'full_html' text format.
$data = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'filter.format.full_html')
->execute()
->fetchField();
$data = unserialize($data);
$data['status'] = FALSE;
$connection->update('config')
->fields(['data' => serialize($data)])
->condition('name', 'filter.format.full_html')
->execute();
@@ -0,0 +1,162 @@
<?php
/**
* @file
* Contains database additions to
* drupal-8.2.1.bare.standard_with_entity_test_enabled.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2248983.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Data for entity type "entity_test_revlog"
$connection->insert('entity_test_revlog')
->fields([
'id',
'revision_id',
'type',
'uuid',
'langcode',
'revision_created',
'revision_user',
'revision_log_message',
'name',
])
->values([
'id' => '1',
'revision_id' => '2',
'type' => 'entity_test_revlog',
'uuid' => 'f0b962b1-391b-441b-a664-2468ad520d96',
'langcode' => 'en',
'revision_created' => '1476268518',
'revision_user' => '1',
'revision_log_message' => 'second revision',
'name' => 'entity 1',
])
->execute();
$connection->insert('entity_test_revlog_revision')
->fields([
'id',
'revision_id',
'langcode',
'revision_created',
'revision_user',
'revision_log_message',
'name',
])
->values([
'id' => '1',
'revision_id' => '1',
'langcode' => 'en',
'revision_created' => '1476268517',
'revision_user' => '1',
'revision_log_message' => 'first revision',
'name' => 'entity 1',
])
->values([
'id' => '1',
'revision_id' => '2',
'langcode' => 'en',
'revision_created' => '1476268518',
'revision_user' => '1',
'revision_log_message' => 'second revision',
'name' => 'entity 1',
])
->execute();
// Data for entity type "entity_test_mul_revlog"
$connection->insert('entity_test_mul_revlog')
->fields([
'id',
'revision_id',
'type',
'uuid',
'langcode',
])
->values([
'id' => '1',
'revision_id' => '2',
'type' => 'entity_test_mul_revlog',
'uuid' => '6f04027a-1cbd-46e3-a67e-72636b493d4f',
'langcode' => 'en',
])
->execute();
$connection->insert('entity_test_mul_revlog_field_data')
->fields([
'id',
'revision_id',
'type',
'langcode',
'revision_created',
'revision_user',
'revision_log_message',
'name',
'default_langcode',
])
->values([
'id' => '1',
'revision_id' => '2',
'type' => 'entity_test_mul_revlog',
'langcode' => 'en',
'revision_created' => '1476268518',
'revision_user' => '1',
'revision_log_message' => 'second revision',
'name' => 'entity 1',
'default_langcode' => '1',
])
->execute();
$connection->insert('entity_test_mul_revlog_field_revision')
->fields([
'id',
'revision_id',
'langcode',
'revision_created',
'revision_user',
'revision_log_message',
'name',
'default_langcode',
])
->values([
'id' => '1',
'revision_id' => '1',
'langcode' => 'en',
'revision_created' => '1476268517',
'revision_user' => '1',
'revision_log_message' => 'first revision',
'name' => 'entity 1',
'default_langcode' => '1',
])
->values([
'id' => '1',
'revision_id' => '2',
'langcode' => 'en',
'revision_created' => '1476268518',
'revision_user' => '1',
'revision_log_message' => 'second revision',
'name' => 'entity 1',
'default_langcode' => '1',
])
->execute();
$connection->insert('entity_test_mul_revlog_revision')
->fields([
'id',
'revision_id',
'langcode',
])
->values([
'id' => '1',
'revision_id' => '1',
'langcode' => 'en',
])
->values([
'id' => '1',
'revision_id' => '2',
'langcode' => 'en',
])
->execute();
@@ -0,0 +1,36 @@
<?php
// @codingStandardsIgnoreFile
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Set the schema version.
$connection->merge('key_value')
->fields([
'value' => 'i:8000;',
'name' => 'entity_test_schema_converter',
'collection' => 'system.schema',
])
->condition('collection', 'system.schema')
->condition('name', 'entity_test_schema_converter')
->execute();
// Update core.extension.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['entity_test_schema_converter'] = 8000;
$connection->update('config')
->fields([
'data' => serialize($extensions),
'collection' => '',
'name' => 'core.extension',
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,74 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2573667.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$connection->insert('key_value')
->fields([
'collection',
'name',
'value',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.body',
'value' => 'a:2:{s:19:"block_content__body";a:4:{s:11:"description";s:42:"Data storage for block_content field body.";s:6:"fields";a:9:{s:6:"bundle";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:88:"The field instance bundle to which this row belongs, used when deleting a field instance";}s:7:"deleted";a:5:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;s:7:"default";i:0;s:11:"description";s:60:"A boolean indicating whether this data item has been deleted";}s:9:"entity_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:38:"The entity id this data is attached to";}s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:47:"The entity revision id this data is attached to";}s:8:"langcode";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:37:"The language code for this data item.";}s:5:"delta";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:67:"The sequence number for this data item, used for multi-value fields";}s:10:"body_value";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:1;}s:12:"body_summary";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}s:11:"body_format";a:3:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:255;s:8:"not null";b:0;}}s:11:"primary key";a:4:{i:0;s:9:"entity_id";i:1;s:7:"deleted";i:2;s:5:"delta";i:3;s:8:"langcode";}s:7:"indexes";a:3:{s:6:"bundle";a:1:{i:0;s:6:"bundle";}s:11:"revision_id";a:1:{i:0;s:11:"revision_id";}s:11:"body_format";a:1:{i:0;s:11:"body_format";}}}s:28:"block_content_revision__body";a:4:{s:11:"description";s:54:"Revision archive storage for block_content field body.";s:6:"fields";a:9:{s:6:"bundle";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:88:"The field instance bundle to which this row belongs, used when deleting a field instance";}s:7:"deleted";a:5:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;s:7:"default";i:0;s:11:"description";s:60:"A boolean indicating whether this data item has been deleted";}s:9:"entity_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:38:"The entity id this data is attached to";}s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:47:"The entity revision id this data is attached to";}s:8:"langcode";a:5:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;s:7:"default";s:0:"";s:11:"description";s:37:"The language code for this data item.";}s:5:"delta";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:8:"not null";b:1;s:11:"description";s:67:"The sequence number for this data item, used for multi-value fields";}s:10:"body_value";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:1;}s:12:"body_summary";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}s:11:"body_format";a:3:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:255;s:8:"not null";b:0;}}s:11:"primary key";a:5:{i:0;s:9:"entity_id";i:1;s:11:"revision_id";i:2;s:7:"deleted";i:3;s:5:"delta";i:4;s:8:"langcode";}s:7:"indexes";a:3:{s:6:"bundle";a:1:{i:0;s:6:"bundle";}s:11:"revision_id";a:1:{i:0;s:11:"revision_id";}s:11:"body_format";a:1:{i:0;s:11:"body_format";}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.changed',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:7:"changed";a:2:{s:4:"type";s:3:"int";s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:7:"changed";a:2:{s:4:"type";s:3:"int";s:8:"not null";b:0;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.default_langcode',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:16:"default_langcode";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:16:"default_langcode";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:1;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.id',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:2:"id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.info',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:4:"info";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:255;s:6:"binary";b:0;s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:4:"info";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:255;s:6:"binary";b:0;s:8:"not null";b:0;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.langcode',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:8:"langcode";a:4:{s:4:"type";s:7:"varchar";s:6:"length";i:12;s:8:"is_ascii";b:1;s:8:"not null";b:1;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_id',
'value' => 'a:4:{s:13:"block_content";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:0;}}}s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:11:"revision_id";a:4:{s:4:"type";s:3:"int";s:8:"unsigned";b:1;s:4:"size";s:6:"normal";s:8:"not null";b:1;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_log',
'value' => 'a:1:{s:22:"block_content_revision";a:1:{s:6:"fields";a:1:{s:12:"revision_log";a:3:{s:4:"type";s:4:"text";s:4:"size";s:3:"big";s:8:"not null";b:0;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.revision_translation_affected',
'value' => 'a:2:{s:24:"block_content_field_data";a:1:{s:6:"fields";a:1:{s:29:"revision_translation_affected";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:0;}}}s:28:"block_content_field_revision";a:1:{s:6:"fields";a:1:{s:29:"revision_translation_affected";a:3:{s:4:"type";s:3:"int";s:4:"size";s:4:"tiny";s:8:"not null";b:0;}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.type',
'value' => 'a:2:{s:13:"block_content";a:2:{s:6:"fields";a:1:{s:4:"type";a:4:{s:11:"description";s:28:"The ID of the target entity.";s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;}}s:7:"indexes";a:1:{s:36:"block_content_field__type__target_id";a:1:{i:0;s:4:"type";}}}s:24:"block_content_field_data";a:2:{s:6:"fields";a:1:{s:4:"type";a:4:{s:11:"description";s:28:"The ID of the target entity.";s:4:"type";s:13:"varchar_ascii";s:6:"length";i:32;s:8:"not null";b:1;}}s:7:"indexes";a:1:{s:36:"block_content_field__type__target_id";a:1:{i:0;s:4:"type";}}}}',
])
->values([
'collection' => 'entity.storage_schema.sql',
'name' => 'block_content.field_schema_data.uuid',
'value' => 'a:1:{s:13:"block_content";a:2:{s:6:"fields";a:1:{s:4:"uuid";a:4:{s:4:"type";s:13:"varchar_ascii";s:6:"length";i:128;s:6:"binary";b:0;s:8:"not null";b:1;}}s:11:"unique keys";a:1:{s:32:"block_content_field__uuid__value";a:1:{i:0;s:4:"uuid";}}}}',
])
->execute();
@@ -0,0 +1,61 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/507488.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a custom block with visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor507488.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:seven')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.seven_local_actions'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:seven')
->execute();
// Enable test theme.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$connection->update('config')
->fields([
'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])),
])
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,61 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2476947.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a custom block with visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor2476947.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_page_title'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute();
// Enable test theme.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$connection->update('config')
->fields([
'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])),
])
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,47 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/507488.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a custom block with visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor2569529.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:seven')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.seven_secondary_local_tasks'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:seven')
->execute();
@@ -0,0 +1,61 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2005546.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a custom block with visibility settings.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor2005546.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.bartik_branding'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute();
// Enable test theme.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$connection->update('config')
->fields([
'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_theme' => 0]])),
])
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,25 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2575421.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Enable test_stable theme.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$connection->update('config')
->fields([
'data' => serialize(array_merge_recursive($extensions, ['theme' => ['test_stable' => 0]])),
])
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,51 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2455125.
*/
use Drupal\Component\Uuid\Php;
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$uuid = new Php();
$tids = [];
for ($i = 0; $i < 60; $i++) {
$name = $this->randomString();
$tid = $connection->insert('taxonomy_term_data')
->fields(['vid', 'uuid', 'langcode'])
->values(['vid' => 'tags', 'uuid' => $uuid->generate(), 'langcode' => 'es'])
->execute();
$connection->insert('taxonomy_term_field_data')
->fields(['tid', 'vid', 'langcode', 'name', 'weight', 'changed', 'default_langcode'])
->values(['tid' => $tid, 'vid' => 'tags', 'langcode' => 'en', 'name' => $name, 'weight' => 0, 'changed' => REQUEST_TIME, 'default_langcode' => 1])
->execute();
$connection->insert('taxonomy_term_field_data')
->fields(['tid', 'vid', 'langcode', 'name', 'weight', 'changed', 'default_langcode'])
->values(['tid' => $tid, 'vid' => 'tags', 'langcode' => 'es', 'name' => $name . ' es', 'weight' => 0, 'changed' => REQUEST_TIME, 'default_langcode' => 0])
->execute();
$tids[] = $tid;
}
$query = $connection->insert('taxonomy_term_hierarchy')->fields(['tid', 'parent']);
$previous_tid = 0;
foreach ($tids as $tid) {
$query->values(['tid' => $tid, 'parent' => $previous_tid]);
$previous_tid = $tid;
}
// Insert an extra record with no corresponding term.
// See https://www.drupal.org/project/drupal/issues/2997982
$query->values(['tid' => max($tids) + 1, 'parent' => 0]);
$query->execute();
@@ -0,0 +1,92 @@
<?php
// @codingStandardsIgnoreFile
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Manually configure the test mail collector implementation to prevent
// tests from sending out emails and collect them in state instead.
// While this should be enforced via settings.php prior to installation,
// some tests expect to be able to test mail system implementations.
$config = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'system.mail')
->execute()
->fetchField();
$config = unserialize($config);
$config['interface']['default'] = 'test_mail_collector';
$connection->update('config')
->fields([
'data' => serialize($config),
'collection' => '',
'name' => 'system.mail',
])
->condition('collection', '')
->condition('name', 'system.mail')
->execute();
// By default, verbosely display all errors and disable all production
// environment optimizations for all tests to avoid needless overhead and
// ensure a sane default experience for test authors.
// @see https://www.drupal.org/node/2259167
$config = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'system.logging')
->execute()
->fetchField();
$config = unserialize($config);
$config['error_level'] = 'verbose';
$connection->update('config')
->fields([
'data' => serialize($config),
'collection' => '',
'name' => 'system.logging',
])
->condition('collection', '')
->condition('name', 'system.logging')
->execute();
$config = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'system.performance')
->execute()
->fetchField();
$config = unserialize($config);
$config['css']['preprocess'] = FALSE;
$config['js']['preprocess'] = FALSE;
$connection->update('config')
->fields([
'data' => serialize($config),
'collection' => '',
'name' => 'system.performance',
])
->condition('collection', '')
->condition('name', 'system.performance')
->execute();
// Set an explicit time zone to not rely on the system one, which may vary
// from setup to setup. The Australia/Sydney time zone is chosen so all
// tests are run using an edge case scenario (UTC10 and DST). This choice
// is made to prevent time zone related regressions and reduce the
// fragility of the testing system in general.
$config = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'system.date')
->execute()
->fetchField();
$config = unserialize($config);
$config['timezone']['default'] = 'Australia/Sydney';
$connection->update('config')
->fields([
'data' => serialize($config),
'collection' => '',
'name' => 'system.date',
])
->condition('collection', '')
->condition('name', 'system.date')
->execute();
@@ -0,0 +1,50 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2513534.
*/
use Drupal\Component\Serialization\Yaml;
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// A disabled block.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.testfor2513534.yml'));
// A block placed in the default region.
$block_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/block.block.secondtestfor2513534.yml'));
foreach ($block_configs as $block_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'block.block.' . $block_config['id'],
'data' => serialize($block_config),
])
->execute();
}
// Update the config entity query "index".
$existing_blocks = $connection->select('key_value')
->fields('key_value', ['value'])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute()
->fetchField();
$existing_blocks = unserialize($existing_blocks);
$connection->update('key_value')
->fields([
'value' => serialize(array_merge($existing_blocks, ['block.block.testfor2513534', 'block.block.secondtestfor2513534'])),
])
->condition('collection', 'config.entity.key_store.block')
->condition('name', 'theme:bartik')
->execute();
@@ -0,0 +1,54 @@
<?php
/**
* @file
* Partial database to mimic the installation of the update_test_schema module.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Create the table.
$connection->schema()->createTable('update_test_schema_table', [
'fields' => [
'a' => [
'type' => 'int',
'not null' => TRUE,
'size' => 'normal',
],
'b' => [
'type' => 'blob',
'not null' => FALSE,
'size' => 'normal',
],
],
]);
// Set the schema version.
$connection->merge('key_value')
->condition('collection', 'system.schema')
->condition('name', 'update_test_schema')
->fields([
'collection' => 'system.schema',
'name' => 'update_test_schema',
'value' => 'i:8000;',
])
->execute();
// Update core.extension.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['update_test_schema'] = 8000;
$connection->update('config')
->fields([
'data' => serialize($extensions),
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,38 @@
<?php
/**
* @file
* Database to mimic the installation of the update_test_semver_update_n module.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
// Set the schema version.
$connection->merge('key_value')
->condition('collection', 'system.schema')
->condition('name', 'update_test_semver_update_n')
->fields([
'collection' => 'system.schema',
'name' => 'update_test_semver_update_n',
'value' => 'i:8000;',
])
->execute();
// Update core.extension.
$extensions = $connection->select('config')
->fields('config', ['data'])
->condition('collection', '')
->condition('name', 'core.extension')
->execute()
->fetchField();
$extensions = unserialize($extensions);
$extensions['module']['update_test_semver_update_n'] = 8000;
$connection->update('config')
->fields([
'data' => serialize($extensions),
])
->condition('collection', '')
->condition('name', 'core.extension')
->execute();
@@ -0,0 +1,32 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2455125.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a view with timestamp fields.
$views_configs = [];
$views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/drupal-8.views-entity-views-data-2455125.yml'));
foreach ($views_configs as $views_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'views.view.' . $views_config['id'],
'data' => serialize($views_config),
])
->execute();
}
@@ -0,0 +1,294 @@
uuid: e693b165-0e14-4dee-9909-9f0892037c23
langcode: en
status: true
dependencies:
module:
- user
id: update_test
label: 'Update Test'
module: views
description: ''
tag: ''
base_table: users_field_data
base_field: uid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access user profiles'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: none
options:
items_per_page: 0
offset: 0
style:
type: default
row:
type: fields
fields:
name:
id: name
table: users_field_data
field: name
entity_type: user
entity_field: name
label: ''
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
html: false
hide_empty: false
empty_zero: false
plugin_id: field
relationship: none
group_type: group
admin_label: ''
exclude: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_alter_empty: true
click_sort_column: value
type: user_name
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
created:
id: created
table: users_field_data
field: created
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
date_format: long
custom_date_format: ''
timezone: Africa/Abidjan
entity_type: user
entity_field: created
plugin_id: date
created_1:
id: created_1
table: users_field_data
field: created
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
date_format: 'raw time ago'
custom_date_format: ''
timezone: ''
entity_type: user
entity_field: created
plugin_id: date
created_2:
id: created_2
table: users_field_data
field: created
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
date_format: 'time ago'
custom_date_format: ''
timezone: ''
entity_type: user
entity_field: created
plugin_id: date
filters: { }
sorts: { }
title: 'Update Test'
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- user.permissions
cacheable: false
block_1:
display_plugin: block
id: block_1
display_title: Block
position: 1
display_options:
display_extenders: { }
allow:
items_per_page: false
cache_metadata:
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- user.permissions
cacheable: false
@@ -0,0 +1,32 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2455125.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// Structure of a view with timestamp fields.
$views_configs = [];
$views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/drupal-8.views-entity-views-data-2846614.yml'));
foreach ($views_configs as $views_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'views.view.' . $views_config['id'],
'data' => serialize($views_config),
])
->execute();
}
@@ -0,0 +1,240 @@
uuid: 001475a0-daec-4e8a-8ca7-97b0d24100a6
langcode: en
status: true
dependencies:
module:
- user
id: test_user_multi_value
label: test_user_multi_value
module: views
description: ''
tag: ''
base_table: users_field_data
base_field: uid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access user profiles'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Filter
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
uses_fields: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: false
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: user
entity_field: roles
plugin_id: field
filters:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
operator: '='
value: ''
group: 1
exposed: false
expose:
operator_id: ''
label: ''
description: ''
use_operator: false
operator: ''
identifier: ''
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
entity_type: user
entity_field: roles
plugin_id: string
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments:
roles:
id: roles
table: user__roles
field: roles
relationship: none
group_type: group
admin_label: ''
default_action: ignore
exception:
value: all
title_enable: false
title: All
title_enable: false
title: ''
default_argument_type: fixed
default_argument_options:
argument: ''
default_argument_skip_url: false
summary_options:
base_path: ''
count: true
items_per_page: 25
override: false
summary:
sort_order: asc
number_of_records: 0
format: default_summary
specify_validation: false
validate:
type: none
fail: 'not found'
validate_options: { }
glossary: false
limit: 0
case: none
path_case: none
transform_dash: false
break_phrase: false
entity_type: user
entity_field: roles
plugin_id: string
display_extenders: { }
cache_metadata:
max-age: -1
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url
- url.query_args
- user.permissions
tags: { }
@@ -0,0 +1,35 @@
<?php
/**
* @file
* Contains database additions to
* drupal-8.2.1.bare.standard_with_entity_test_enabled.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2248983.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
// View for the entity type "entity_test_revlog".
$views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/views.view.entity_test_revlog_for_2248983.yml'));
// View for the entity type "entity_test_mul_revlog".
$views_configs[] = Yaml::decode(file_get_contents(__DIR__ . '/views.view.entity_test_mul_revlog_for_2248983.yml'));
foreach ($views_configs as $views_config) {
$connection->insert('config')
->fields([
'collection',
'name',
'data',
])
->values([
'collection' => '',
'name' => 'views.view.' . $views_config['id'],
'data' => serialize($views_config),
])
->execute();
}
@@ -0,0 +1,67 @@
<?php
/**
* @file
* Contains database additions to drupal-8.bare.standard.php.gz for testing the
* upgrade path of https://www.drupal.org/node/2455125.
*/
use Drupal\Component\Uuid\Php;
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
$view_file = __DIR__ . '/drupal-8.views-taxonomy-parent-2543726.yml';
$view_config = Yaml::decode(file_get_contents($view_file));
$connection->insert('config')
->fields(['collection', 'name', 'data'])
->values([
'collection' => '',
'name' => "views.view.test_taxonomy_parent",
'data' => serialize($view_config),
])
->execute();
$uuid = new Php();
// The root tid.
$tids = [0];
for ($i = 0; $i < 4; $i++) {
$name = $this->randomString();
$tid = $connection->insert('taxonomy_term_data')
->fields(['vid', 'uuid', 'langcode'])
->values(['vid' => 'tags', 'uuid' => $uuid->generate(), 'langcode' => 'en'])
->execute();
$connection->insert('taxonomy_term_field_data')
->fields(['tid', 'vid', 'langcode', 'name', 'weight', 'changed', 'default_langcode'])
->values(['tid' => $tid, 'vid' => 'tags', 'langcode' => 'en', 'name' => $name, 'weight' => 0, 'changed' => REQUEST_TIME, 'default_langcode' => 1])
->execute();
$tids[] = $tid;
}
$hierarchy = [
// Term with tid 1 has terms with tids 2 and 3 as parents.
1 => [2, 3],
2 => [3, 0],
3 => [0],
];
$query = $connection->insert('taxonomy_term_hierarchy')->fields(['tid', 'parent']);
foreach ($hierarchy as $tid => $parents) {
foreach ($parents as $parent) {
$query->values(['tid' => $tids[$tid], 'parent' => $tids[$parent]]);
}
}
// Insert an extra record with no corresponding term.
// See https://www.drupal.org/project/drupal/issues/2997982
$query->values(['tid' => max($tids) + 1, 'parent' => 0]);
$query->execute();
@@ -0,0 +1,222 @@
langcode: en
status: true
dependencies:
module:
- taxonomy
- user
id: test_taxonomy_parent
label: test_taxonomy_parent
module: views
description: ''
tag: ''
base_table: taxonomy_term_data
base_field: tid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: perm
options:
perm: 'access content'
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: full
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ' Previous'
next: 'Next '
first: '« First'
last: 'Last »'
quantity: 9
style:
type: default
options:
grouping: { }
row_class: ''
default_row_class: true
uses_fields: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
name:
id: name
table: taxonomy_term_data
field: name
label: ''
alter:
alter_text: false
make_link: false
absolute: false
trim: false
word_boundary: false
ellipsis: false
strip_tags: false
html: false
hide_empty: false
empty_zero: false
relationship: none
group_type: group
admin_label: ''
exclude: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_alter_empty: true
plugin_id: field
type: string
settings:
link_to_entity: true
entity_type: taxonomy_term
entity_field: name
filters:
parent:
id: parent
table: taxonomy_term_hierarchy
field: parent
relationship: field_tags
group_type: group
admin_label: ''
operator: '='
value:
min: ''
max: ''
value: ''
group: 1
exposed: true
expose:
operator_id: parent_op
label: 'Parent term'
description: ''
use_operator: false
operator: parent_op
identifier: parent
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
placeholder: ''
min_placeholder: ''
max_placeholder: ''
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
plugin_id: numeric
parent_1:
id: parent_1
table: taxonomy_term_hierarchy
field: parent
relationship: field_tags
group_type: group
admin_label: ''
operator: '='
value:
min: ''
max: ''
value: ''
group: 1
exposed: true
expose:
operator_id: parent_1_op
label: 'Parent term'
description: ''
use_operator: false
operator: parent_1_op
identifier: parent_1
required: false
remember: false
multiple: false
remember_roles:
authenticated: authenticated
anonymous: '0'
administrator: '0'
placeholder: ''
min_placeholder: ''
max_placeholder: ''
is_grouped: false
group_info:
label: ''
description: ''
identifier: ''
optional: true
widget: select
multiple: false
remember: false
default_group: All
default_group_multiple: { }
group_items: { }
plugin_id: numeric
sorts: { }
header: { }
footer: { }
empty: { }
relationships:
parent:
id: parent
table: taxonomy_term__parent
field: parent_target_id
relationship: none
group_type: group
admin_label: Parent
required: true
plugin_id: standard
arguments: { }
@@ -0,0 +1,21 @@
<?php
/**
* @file
* Test fixture.
*/
use Drupal\Core\Database\Database;
$connection = Database::getConnection();
$config = $connection;
$connection->merge('config')
->condition('name', 'system.cron')
->condition('collection', '')
->fields([
'name' => 'system.cron',
'collection' => '',
'data' => serialize(['threshold' => ['autorun' => 0]]),
])
->execute();
@@ -0,0 +1,22 @@
<?php
/**
* @file
* Contains database additions to drupal-8-rc1.bare.standard.php.gz for testing
* the upgrade path of https://www.drupal.org/node/2649914.
*/
use Drupal\Core\Database\Database;
use Drupal\Core\Serialization\Yaml;
$connection = Database::getConnection();
$views_config = Yaml::decode(file_get_contents(__DIR__ . '/drupal8.views-image-style-dependency-2649914.yml'));
$connection->insert('config')
->fields(['collection', 'name', 'data'])
->values([
'collection' => '',
'name' => 'views.view.' . $views_config['id'],
'data' => serialize($views_config),
])->execute();
@@ -0,0 +1,43 @@
langcode: en
status: true
dependencies:
config:
- field.storage.node.field_image
module:
- image
- node
id: foo
label: Foo
module: views
description: ''
tag: ''
base_table: node_field_data
base_field: nid
core: 8.x
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
fields:
field_image:
id: field_image
table: node__field_image
field: field_image
type: image
settings:
image_style: thumbnail
image_link: ''
plugin_id: field
field_image_1:
id: field_image_1
table: node__field_image
field: field_image
type: image
settings:
# This field's formatter is using a non-existent image style.
image_style: nonexistent
image_link: ''
plugin_id: field
@@ -0,0 +1 @@
bogus_key: 'Should be cleaned by system_update_8200'
@@ -0,0 +1,15 @@
label: 'Spanish Content'
description: 'Spanish Find and manage content.'
display:
default:
display_options:
fields:
title:
label: 'Spanish Title'
name:
label: 'Spanish Author'
nid:
label: 'Spanish ID'
display_title: 'Spanish Master'
page_1:
display_title: 'Spanish Page'
@@ -0,0 +1,12 @@
uuid: 2573293e-c7b6-4f53-905a-10ec7c55f3d0
langcode: en
status: true
dependencies:
module:
- action
id: goto_2815379
label: 'Goto action'
type: system
plugin: action_goto_action
configuration:
url: /user
@@ -0,0 +1,12 @@
uuid: e34302d4-3afc-40ec-bdf0-cbd23e2f7f52
langcode: en
status: true
dependencies:
module:
- action
id: message_2815379
label: 'Display message'
type: system
plugin: action_message_action
configuration:
message: 'Test message'
@@ -0,0 +1,14 @@
uuid: 741d330c-9260-45f8-8a81-67d2cd430f4a
langcode: en
status: true
dependencies:
module:
- action
id: send_email_2815379
label: 'Send email'
type: system
plugin: action_send_email_action
configuration:
recipient: drupal@example.com
subject: Subject
message: Message
@@ -0,0 +1,434 @@
uuid: 25b89168-a8e5-4ae1-8fb5-c8efb91f0938
langcode: en
status: true
dependencies:
module:
- entity_test_revlog
id: entity_test_mul_revlog_for_2248983
label: entity_test_mul_revlog
module: views
description: ''
tag: ''
base_table: entity_test_mul_revlog_property_data
base_field: id
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: table
options:
grouping: { }
row_class: ''
default_row_class: true
override: true
sticky: false
caption: ''
summary: ''
description: ''
columns:
name: name
info:
name:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
default: '-1'
empty_table: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
name:
table: entity_test_mul_revlog_property_data
field: name
id: name
entity_type: entity_test_mul_revlog
entity_field: name
plugin_id: field
relationship: none
group_type: group
admin_label: ''
label: ''
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
revision_created:
id: revision_created
table: entity_test_mul_revlog_property_data
field: revision_created
relationship: none
group_type: group
admin_label: ''
label: 'Revision create time'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: timestamp
settings:
date_format: medium
custom_date_format: ''
timezone: ''
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_mul_revlog
entity_field: revision_created
plugin_id: field
revision_id:
id: revision_id
table: entity_test_mul_revlog_property_data
field: revision_id
relationship: none
group_type: group
admin_label: ''
label: 'Revision ID'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_mul_revlog
entity_field: revision_id
plugin_id: field
revision_log_message:
id: revision_log_message
table: entity_test_mul_revlog_property_data
field: revision_log_message
relationship: none
group_type: group
admin_label: ''
label: 'Revision log message'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: basic_string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_mul_revlog
entity_field: revision_log_message
plugin_id: field
revision_user:
id: revision_user
table: entity_test_mul_revlog_property_data
field: revision_user
relationship: none
group_type: group
admin_label: ''
label: 'Revision user'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_mul_revlog
entity_field: revision_user
plugin_id: field
filters: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url.query_args
tags: { }
@@ -0,0 +1,435 @@
uuid: 5a8b00d2-67ce-415b-9e7d-6c013bf7f6b8
langcode: en
status: true
dependencies:
module:
- entity_test_revlog
id: entity_test_revlog_for_2248983
label: entity_test_revlog
module: views
description: ''
tag: ''
base_table: entity_test_revlog
base_field: id
display:
default:
display_plugin: default
id: default
display_title: Master
position: 0
display_options:
access:
type: none
options: { }
cache:
type: tag
options: { }
query:
type: views_query
options:
disable_sql_rewrite: false
distinct: false
replica: false
query_comment: ''
query_tags: { }
exposed_form:
type: basic
options:
submit_button: Apply
reset_button: false
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
pager:
type: mini
options:
items_per_page: 10
offset: 0
id: 0
total_pages: null
expose:
items_per_page: false
items_per_page_label: 'Items per page'
items_per_page_options: '5, 10, 25, 50'
items_per_page_options_all: false
items_per_page_options_all_label: '- All -'
offset: false
offset_label: Offset
tags:
previous: ‹‹
next: ››
style:
type: table
options:
grouping: { }
row_class: ''
default_row_class: true
override: true
sticky: false
caption: ''
summary: ''
description: ''
columns:
name: name
info:
name:
sortable: false
default_sort_order: asc
align: ''
separator: ''
empty_column: false
responsive: ''
default: '-1'
empty_table: false
row:
type: fields
options:
inline: { }
separator: ''
hide_empty: false
default_field_elements: true
fields:
name:
id: name
table: entity_test_revlog
field: name
relationship: none
group_type: group
admin_label: ''
label: Name
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: string
settings:
link_to_entity: false
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_revlog
entity_field: name
plugin_id: field
revision_created:
id: revision_created
table: entity_test_revlog
field: revision_created
relationship: none
group_type: group
admin_label: ''
label: 'Revision create time'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: timestamp
settings:
date_format: medium
custom_date_format: ''
timezone: ''
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_revlog
entity_field: revision_created
plugin_id: field
revision_id:
id: revision_id
table: entity_test_revlog
field: revision_id
relationship: none
group_type: group
admin_label: ''
label: 'Revision ID'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: number_integer
settings:
thousand_separator: ''
prefix_suffix: true
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_revlog
entity_field: revision_id
plugin_id: field
revision_log_message:
id: revision_log_message
table: entity_test_revlog
field: revision_log_message
relationship: none
group_type: group
admin_label: ''
label: 'Revision log message'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: value
type: basic_string
settings: { }
group_column: value
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_revlog
entity_field: revision_log_message
plugin_id: field
revision_user:
id: revision_user
table: entity_test_revlog
field: revision_user
relationship: none
group_type: group
admin_label: ''
label: 'Revision user'
exclude: false
alter:
alter_text: false
text: ''
make_link: false
path: ''
absolute: false
external: false
replace_spaces: false
path_case: none
trim_whitespace: false
alt: ''
rel: ''
link_class: ''
prefix: ''
suffix: ''
target: ''
nl2br: false
max_length: 0
word_boundary: true
ellipsis: true
more_link: false
more_link_text: ''
more_link_path: ''
strip_tags: false
trim: false
preserve_tags: ''
html: false
element_type: ''
element_class: ''
element_label_type: ''
element_label_class: ''
element_label_colon: true
element_wrapper_type: ''
element_wrapper_class: ''
element_default_classes: true
empty: ''
hide_empty: false
empty_zero: false
hide_alter_empty: true
click_sort_column: target_id
type: entity_reference_label
settings:
link: true
group_column: target_id
group_columns: { }
group_rows: true
delta_limit: 0
delta_offset: 0
delta_reversed: false
delta_first_last: false
multi_type: separator
separator: ', '
field_api_classes: false
entity_type: entity_test_revlog
entity_field: revision_user
plugin_id: field
filters: { }
sorts: { }
header: { }
footer: { }
empty: { }
relationships: { }
arguments: { }
display_extenders: { }
cache_metadata:
max-age: 0
contexts:
- 'languages:language_content'
- 'languages:language_interface'
- url.query_args
tags: { }
+29
View File
@@ -0,0 +1,29 @@
<?php
/**
* @file
* Fake an HTTP request, for use during testing.
*/
use Drupal\Core\Test\TestKernel;
use Symfony\Component\HttpFoundation\Request;
chdir('../../../..');
$autoloader = require_once 'autoload.php';
// Change to HTTP.
$_SERVER['HTTPS'] = NULL;
ini_set('session.cookie_secure', FALSE);
foreach ($_SERVER as &$value) {
$value = str_replace('core/modules/system/tests/http.php', 'index.php', $value);
$value = str_replace('https://', 'http://', $value);
}
$kernel = new TestKernel('testing', $autoloader, TRUE);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
+31
View File
@@ -0,0 +1,31 @@
<?php
/**
* @file
* Fake an HTTPS request, for use during testing.
*
* @todo Fix this to use a new request rather than modifying server variables,
* see http.php.
*/
use Drupal\Core\Test\TestKernel;
use Symfony\Component\HttpFoundation\Request;
chdir('../../../..');
$autoloader = require_once 'autoload.php';
// Change to HTTPS.
$_SERVER['HTTPS'] = 'on';
foreach ($_SERVER as &$value) {
$value = str_replace('core/modules/system/tests/https.php', 'index.php', $value);
$value = str_replace('http://', 'https://', $value);
}
$kernel = new TestKernel('testing', $autoloader, TRUE);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Binary file not shown.
@@ -0,0 +1,5 @@
name: Accept header based routing test
core: 8.x
type: module
package: Testing
version: VERSION

Some files were not shown because too many files have changed in this diff Show More