function UpdateCalculateProjectDataTest::setCoreVersion

Same name in other branches
  1. 10 core/modules/update/tests/src/Kernel/UpdateCalculateProjectDataTest.php \Drupal\Tests\update\Kernel\UpdateCalculateProjectDataTest::setCoreVersion()

Sets the installed version of core, as known to the Update module.

Parameters

string $version: The core version.

See also

update_test_system_info_alter()

1 call to UpdateCalculateProjectDataTest::setCoreVersion()
UpdateCalculateProjectDataTest::setUp in core/modules/update/tests/src/Kernel/UpdateCalculateProjectDataTest.php

File

core/modules/update/tests/src/Kernel/UpdateCalculateProjectDataTest.php, line 56

Class

UpdateCalculateProjectDataTest
Test the values set in update_calculate_project_data().

Namespace

Drupal\Tests\update\Kernel

Code

protected function setCoreVersion(string $version) : void {
    $this->config('update_test.settings')
        ->set('system_info.#all.version', $version)
        ->save();
}

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