Update to Drupal 8.2.2. For more information, see https://www.drupal.org/project/drupal/releases/8.2.2

This commit is contained in:
Pantheon Automation 2016-11-02 11:43:31 -07:00 committed by Greg Anderson
parent 23ffed3665
commit 507b45a0ed
378 changed files with 11434 additions and 5542 deletions

View file

@ -25,5 +25,5 @@ tips:
id: language-add-continue
plugin: text
label: 'Continuing on'
body: '<p>Now that you have an overview of the "Add languages" feature, you can continue by:<ul><li>Adding a language</li><li>Adding a custom language</li><li><a href="[site:url]/admin/config/regional/language">Viewing configured languages</a></li></ul></p>'
body: '<p>Now that you have an overview of the "Add languages" feature, you can continue by:<ul><li>Adding a language</li><li>Adding a custom language</li><li><a href="[site:url]admin/config/regional/language">Viewing configured languages</a></li></ul></p>'
weight: 3

View file

@ -41,5 +41,5 @@ tips:
id: language-edit-continue
plugin: text
label: 'Continuing on'
body: '<p>Now that you have an overview of the "Edit language" feature, you can continue by:<ul><li>Editing a language</li><li><a href="[site:url]/admin/config/regional/language">Viewing configured languages</a></li></ul></p>'
body: '<p>Now that you have an overview of the "Edit language" feature, you can continue by:<ul><li>Editing a language</li><li><a href="[site:url]admin/config/regional/language">Viewing configured languages</a></li></ul></p>'
weight: 5

View file

@ -49,5 +49,5 @@ tips:
id: language-continue
plugin: text
label: 'Continuing on'
body: '<p>Now that you have an overview of the "Languages" page, you can continue by:<ul><li><a href="[site:url]/admin/config/regional/language/add">Adding a language</a></li><li>Reordering languages</li><li>Editing a language</li><li>Deleting a language</li></ul></p>'
body: '<p>Now that you have an overview of the "Languages" page, you can continue by:<ul><li><a href="[site:url]admin/config/regional/language/add">Adding a language</a></li><li>Reordering languages</li><li>Editing a language</li><li>Deleting a language</li></ul></p>'
weight: 6

View file

@ -10,9 +10,22 @@ source:
process:
default_langcode:
-
plugin: callback
callable: get_object_vars
plugin: default_value
source: language_default
default_value:
'language': 'en'
# Encode and decode to turn the default_language variable, which is
# an stdClass, into an array so it can be passed to extract.
-
plugin: callback
callable:
- '\Drupal\Component\Serialization\Json'
- 'encode'
-
plugin: callback
callable:
- '\Drupal\Component\Serialization\Json'
- 'decode'
-
plugin: extract
index:

View file

@ -23,7 +23,7 @@ class NegotiationUrlForm extends ConfigFormBase {
protected $languageManager;
/**
* Constructs a new LanguageDeleteForm object.
* Constructs a new NegotiationUrlForm object.
*
* @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
* The factory for configuration objects.

View file

@ -38,7 +38,7 @@ trait MigrateDefaultLanguageTrait {
// default_langcode config should be set.
$default_language = ConfigurableLanguage::load($langcode);
$this->assertNotNull($default_language);
$this->assertIdentical($langcode, $this->config('system.site')->get('default_langcode'));
$this->assertSame($langcode, $this->config('system.site')->get('default_langcode'));
}
else {
// Otherwise, the migration log should contain an error message.
@ -46,11 +46,31 @@ trait MigrateDefaultLanguageTrait {
$count = 0;
foreach ($messages as $message) {
$count++;
$this->assertEqual($message->message, "The language '$langcode' does not exist on this site.");
$this->assertEqual($message->level, MigrationInterface::MESSAGE_ERROR);
$this->assertSame($message->message, "The language '$langcode' does not exist on this site.");
$this->assertSame((int) $message->level, MigrationInterface::MESSAGE_ERROR);
}
$this->assertEqual($count, 1);
$this->assertSame($count, 1);
}
}
/**
* Helper method to test migrating the default language when no default language is set.
*/
protected function doTestMigrationWithUnsetVariable() {
// Delete the language_default variable.
$this->sourceDatabase->delete('variable')
->condition('name', 'language_default' )
->execute();
$this->startCollectingMessages();
$this->executeMigrations(['language', 'default_language']);
$messages = $this->migration->getIdMap()->getMessageIterator()->fetchAll();
// Make sure there's no migration exceptions.
$this->assertEmpty($messages);
// Make sure the default langcode is 'en', since it was the default on D6 & D7.
$this->assertSame('en', $this->config('system.site')->get('default_langcode'));
}
}

View file

@ -33,4 +33,11 @@ class MigrateDefaultLanguageTest extends MigrateDrupal6TestBase {
$this->doTestMigration('tv', FALSE);
}
/**
* Tests language_default migration with unset variable.
*/
public function testMigrationWithUnsetVariable() {
$this->doTestMigrationWithUnsetVariable();
}
}

View file

@ -33,4 +33,11 @@ class MigrateDefaultLanguageTest extends MigrateDrupal7TestBase {
$this->doTestMigration('tv', FALSE);
}
/**
* Tests language_default migration with unset variable.
*/
public function testMigrationWithUnsetVariable() {
$this->doTestMigrationWithUnsetVariable();
}
}