By omkar.podey on
Change record status:
Published (View all published change records)
Project:
Introduced in branch:
10.2.x
Introduced in version:
10.2.0
Issue links:
Description:
- New
UpdateTestTraithas three methods to update config keyssystem_infoandxml_mapinupdate_test.settings - Removed the pattern
$this->config('update_test.settings')->set('the key')forsystem_infoandxml_map, replaced with 3 aptly named methodsmockInstalledExtensionsInfo,mockDefaultExtensionsInfoandmockReleaseHistory - Added relevant info + references and examples for the methods.
Example
Set system_info
before
$system_info =
[
'#all' => [
'version' => '8.0.0',
],
'aaa_update_test' => [
'project' => 'aaa_update_test',
'version' => '8.x-1.0',
'hidden' => FALSE,
],
]
$this->config('update_test.settings')->set('system_info', $system_info)->save();
after
$installed_extensions =
[
'aaa_update_test' => [
'project' => 'aaa_update_test',
'version' => '8.x-1.0',
'hidden' => FALSE,
],
]
$this->mockInstalledExtensionsInfo($installed_extensions);
$this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
Set xml_map
before
$this->config('update_test.settings')
->set('xml_map', ['drupal' => 'sec.0.2'])
->save();
after
$this->mockReleaseHistory(['drupal' => 'sec.0.2']);
Impacts:
Module developers