function UpdateTestTrait::mockReleaseHistory

Same name in other branches
  1. 11.x core/modules/update/tests/src/Functional/UpdateTestTrait.php \Drupal\Tests\update\Functional\UpdateTestTrait::mockReleaseHistory()

Sets available release history.

Parameters

string[] $release_history: The release history XML files to use for particular extension(s). The keys are the extension names (use 'drupal' for Drupal core itself), and the values are the suffix of the release history XML file to use. For example,

 'drupal' => 'sec.8.0.2' 

will map to a file called drupal.sec.8.0.2.xml. Look at core/modules/update/tests/fixtures/release-history for more release history XML examples.

6 calls to UpdateTestTrait::mockReleaseHistory()
UpdateMiscTest::testLanguageModuleUpdate in core/modules/update/tests/src/Functional/UpdateMiscTest.php
Checks language module in core package at admin/reports/updates.
UpdateMiscTest::testModulePageRunCron in core/modules/update/tests/src/Functional/UpdateMiscTest.php
Checks that running cron updates the list of available updates.
UpdateMiscTest::testModulePageSecurityUpdate in core/modules/update/tests/src/Functional/UpdateMiscTest.php
Checks the messages at admin/modules when a security update is missing.
UpdateSemverCoreTest::testBrokenThenFixedUpdates in core/modules/update/tests/src/Functional/UpdateSemverCoreTest.php
Checks that Drupal recovers after problems connecting to update server.
UpdateTestBase::refreshUpdateStatus in core/modules/update/tests/src/Functional/UpdateTestBase.php
Refreshes the update status based on the desired available update scenario.

... See full list

File

core/modules/update/tests/src/Functional/UpdateTestTrait.php, line 73

Class

UpdateTestTrait
Provides a trait to set system info and XML mappings.

Namespace

Drupal\Tests\update\Functional

Code

protected function mockReleaseHistory(array $release_history) : void {
    $this->config('update_test.settings')
        ->set('xml_map', $release_history)
        ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.