Skip to content
Snippets Groups Projects
Commit 5da22c7a authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2130307 by quietone, michaellenahan, phenaproxima, David Hernández,...

Issue #2130307 by quietone, michaellenahan, phenaproxima, David Hernández, fastangel, eliza411: Variable to config: language.negotiation [d7]
parent 6466caad
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
id: d7_language_negotiation_settings
label: Drupal 7 language negotiation settings
migration_tags:
- Drupal 7
source:
plugin: variable
variables:
- locale_language_negotiation_session_param
- locale_language_negotiation_url_part
process:
'session/parameter': locale_language_negotiation_session_param
'url/source': locale_language_negotiation_url_part
destination:
plugin: config
config_name: language.negotiation
<?php
/**
* @file
* Contains \Drupal\language\Tests\Migrate\d7\MigrateLanguageNegotiationSettingsTest.
*/
namespace Drupal\language\Tests\Migrate\d7;
use Drupal\migrate_drupal\Tests\d7\MigrateDrupal7TestBase;
/**
* Tests migration of language negotiation variables.
*
* @group language
*/
class MigrateLanguageNegotiationSettingsTest extends MigrateDrupal7TestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['language'];
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->executeMigration('d7_language_negotiation_settings');
}
/**
* Tests migration of language negotiation variables to language.negotiation.yml.
*/
public function testLanguageNegotiation() {
$config = $this->config('language.negotiation');
$this->assertIdentical($config->get('session.parameter'), 'language');
$this->assertIdentical($config->get('url.source'), 'domain');
}
}
......@@ -199,6 +199,12 @@ public function load() {
))->values(array(
'name' => 'language_types',
'value' => 'a:3:{s:8:"language";b:1;s:16:"language_content";b:0;s:12:"language_url";b:0;}',
))->values(array(
'name' => 'locale_language_negotiation_session_param',
'value' => 's:8:"language";',
))->values(array(
'name' => 'locale_language_negotiation_url_part',
'value' => 's:6:"domain";',
))->values(array(
'name' => 'maintenance_mode',
'value' => 'i:0;',
......@@ -482,4 +488,4 @@ public function load() {
}
}
#e9148e9bed6f5b345cc1a281afe38dd0
#6c379107303f95fe9118597506168dc2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment