Change record status: 
Project: 
Introduced in branch: 
10.2.x
Introduced in version: 
10.2.0
Description: 
  1. New UpdateTestTrait has three methods to update config keys system_info and xml_map in update_test.settings
  2. 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
  3. 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