function UpdateContribTest::testUpdateBaseThemeSecurityUpdate
Same name in other branches
- 9 core/modules/update/tests/src/Functional/UpdateContribTest.php \Drupal\Tests\update\Functional\UpdateContribTest::testUpdateBaseThemeSecurityUpdate()
- 8.9.x core/modules/update/tests/src/Functional/UpdateContribTest.php \Drupal\Tests\update\Functional\UpdateContribTest::testUpdateBaseThemeSecurityUpdate()
- 11.x core/modules/update/tests/src/Functional/UpdateContribTest.php \Drupal\Tests\update\Functional\UpdateContribTest::testUpdateBaseThemeSecurityUpdate()
Tests that subthemes are notified about security updates for base themes.
File
-
core/
modules/ update/ tests/ src/ Functional/ UpdateContribTest.php, line 211
Class
- UpdateContribTest
- Tests how the Update Manager handles contributed modules and themes.
Namespace
Drupal\Tests\update\FunctionalCode
public function testUpdateBaseThemeSecurityUpdate() : void {
// @todo https://www.drupal.org/node/2338175 base themes have to be
// installed.
// Only install the subtheme, not the base theme.
\Drupal::service('theme_installer')->install([
'update_test_subtheme',
]);
// Define the initial state for core and the subtheme.
$this->mockInstalledExtensionsInfo([
// Show the update_test_basetheme.
'update_test_basetheme' => [
'project' => 'update_test_basetheme',
'version' => '8.x-1.0',
'hidden' => FALSE,
],
// Show the update_test_subtheme.
'update_test_subtheme' => [
'project' => 'update_test_subtheme',
'version' => '8.x-1.0',
'hidden' => FALSE,
],
]);
$xml_mapping = [
'drupal' => '8.0.0',
'update_test_subtheme' => '1_0',
'update_test_basetheme' => '1_1-sec',
];
$this->refreshUpdateStatus($xml_mapping);
$this->assertSession()
->pageTextContains('Security update required!');
$this->updateProject = 'update_test_basetheme';
$this->assertVersionUpdateLinks('Security update', '8.x-1.1');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.