Update to Drupal 8.2.5. For more information, see https://www.drupal.org/project/drupal/releases/8.2.5
This commit is contained in:
parent
8544b60b39
commit
db56c09587
86 changed files with 2413 additions and 488 deletions
|
|
@ -411,6 +411,7 @@ class ModulesListForm extends FormBase {
|
|||
foreach (array_keys($modules['install']) as $module) {
|
||||
if (!drupal_check_module($module)) {
|
||||
unset($modules['install'][$module]);
|
||||
unset($modules['experimental'][$module]);
|
||||
foreach (array_keys($data[$module]->required_by) as $dependent) {
|
||||
unset($modules['install'][$dependent]);
|
||||
unset($modules['dependencies'][$dependent]);
|
||||
|
|
|
|||
|
|
@ -120,6 +120,14 @@ class ExperimentalModuleTest extends WebTestBase {
|
|||
$this->drupalPostForm(NULL, [], 'Continue');
|
||||
$this->assertText('2 modules have been enabled: Experimental Test, Experimental Dependency Test');
|
||||
|
||||
// Try to enable an experimental module that can not be due to
|
||||
// hook_requirements().
|
||||
\Drupal::state()->set('experimental_module_requirements_test_requirements', TRUE);
|
||||
$edit = [];
|
||||
$edit["modules[Core (Experimental)][experimental_module_requirements_test][enable]"] = TRUE;
|
||||
$this->drupalPostForm('admin/modules', $edit, 'Install');
|
||||
$this->assertUrl('admin/modules', [], 'If the module can not be installed we are not taken to the confirm form.');
|
||||
$this->assertText('The Experimental Test Requirements module can not be installed.');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,8 @@ abstract class UpdatePathTestBase extends WebTestBase {
|
|||
$this->container = \Drupal::getContainer();
|
||||
|
||||
$this->replaceUser1();
|
||||
|
||||
require_once \Drupal::root() . '/core/includes/update.inc';
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -251,6 +253,28 @@ abstract class UpdatePathTestBase extends WebTestBase {
|
|||
if ($this->checkFailedUpdates) {
|
||||
$this->assertNoRaw('<strong>' . t('Failed:') . '</strong>');
|
||||
|
||||
// Ensure that there are no pending updates.
|
||||
foreach (['update', 'post_update'] as $update_type) {
|
||||
switch ($update_type) {
|
||||
case 'update':
|
||||
$all_updates = update_get_update_list();
|
||||
break;
|
||||
case 'post_update':
|
||||
$all_updates = \Drupal::service('update.post_update_registry')->getPendingUpdateInformation();
|
||||
break;
|
||||
}
|
||||
foreach ($all_updates as $module => $updates) {
|
||||
if (!empty($updates['pending'])) {
|
||||
foreach (array_keys($updates['pending']) as $update_name) {
|
||||
$this->fail("The $update_name() update function from the $module module did not run.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Reset the static cache of drupal_get_installed_schema_version() so that
|
||||
// more complex update path testing works.
|
||||
drupal_static_reset('drupal_get_installed_schema_version');
|
||||
|
||||
// The config schema can be incorrect while the update functions are being
|
||||
// executed. But once the update has been completed, it needs to be valid
|
||||
// again. Assert the schema of all configuration objects now.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
name: 'Experimental Requirements Test'
|
||||
type: module
|
||||
description: 'Module in the experimental package to test hook_requirements() with an experimental module.'
|
||||
package: Core (Experimental)
|
||||
version: VERSION
|
||||
core: 8.x
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Experimental Test Requirements module to test hook_requirements().
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_requirements().
|
||||
*/
|
||||
function experimental_module_requirements_test_requirements() {
|
||||
$requirements = [];
|
||||
if (\Drupal::state()->get('experimental_module_requirements_test_requirements', FALSE)) {
|
||||
$requirements['experimental_module_requirements_test_requirements'] = [
|
||||
'severity' => REQUIREMENT_ERROR,
|
||||
'description' => t('The Experimental Test Requirements module can not be installed.'),
|
||||
];
|
||||
}
|
||||
return $requirements;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file
|
||||
* Experimental Test Requirements module to test hook_requirements().
|
||||
*/
|
||||
|
||||
/**
|
||||
* Implements hook_help().
|
||||
*/
|
||||
function experimental_module_requirements_test_help($route_name) {
|
||||
switch ($route_name) {
|
||||
case 'help.page.experimental_module_requirements_test':
|
||||
// Make the help text conform to core standards. See
|
||||
// \Drupal\system\Tests\Module\InstallUninstallTest::assertHelp().
|
||||
return t('The Experimental Requirements Test module is not done yet. It may eat your data, but you can read the <a href=":url">online documentation for the Experimental Requirements Test module</a>.', [':url' => 'http://www.example.com']);
|
||||
}
|
||||
}
|
||||
Reference in a new issue