New UpdateTestTrait has three methods to update config keys system_info and xml_map in update_test.settings
Removed the pattern $this->config('update_test.settings')->set('the key') for system_info and xml_map, replaced with 3 aptly named methods mockInstalledExtensionsInfo , mockDefaultExtensionsInfo and mockReleaseHistory
Added relevant info + references and examples for the methods.
https://www.drupal.org/node/3358840
Introduced in branch/version: 10.2.x / 10.2.0
UpdateTestTrait
has three methods to update config keyssystem_info
andxml_map
inupdate_test.settings
$this->config('update_test.settings')->set('the key')
forsystem_info
andxml_map
, replaced with 3 aptly named methodsmockInstalledExtensionsInfo
,mockDefaultExtensionsInfo
andmockReleaseHistory
Example
Set system_info
before
$this->config('update_test.settings')->set('system_info', $system_info)->save();
after
$this->mockInstalledExtensionsInfo($installed_extensions);
$this->mockDefaultExtensionsInfo(['version' => '8.0.0']);
Set xml_map
before
after
$this->mockReleaseHistory(['drupal' => 'sec.0.2']);