You are here

protected function UpdateSemverContribTest::setProjectInstalledVersion in Drupal 9

Sets the project installed version.

Parameters

string $version: The version number.

Overrides UpdateSemverTestBase::setProjectInstalledVersion

File

core/modules/update/tests/src/Functional/UpdateSemverContribTest.php, line 35

Class

UpdateSemverContribTest
Tests the Update Manager module with a contrib module with semver versions.

Namespace

Drupal\Tests\update\Functional

Code

protected function setProjectInstalledVersion($version) {
  $system_info = [
    $this->updateProject => [
      'project' => $this->updateProject,
      'version' => $version,
      'hidden' => FALSE,
    ],
    // Ensure Drupal core on the same version for all test runs.
    'drupal' => [
      'project' => 'drupal',
      'version' => '8.0.0',
      'hidden' => FALSE,
    ],
  ];
  $this
    ->config('update_test.settings')
    ->set('system_info', $system_info)
    ->save();
}