function UpdateSemverContribTestBase::setProjectInstalledVersion

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

Overrides UpdateSemverTestBase::setProjectInstalledVersion

1 call to UpdateSemverContribTestBase::setProjectInstalledVersion()
UpdateSemverContribTestBase::testUpdatesLegacyToSemver in core/modules/update/tests/src/Functional/UpdateSemverContribTestBase.php
Tests updates from legacy versions to the semver versions.

File

core/modules/update/tests/src/Functional/UpdateSemverContribTestBase.php, line 38

Class

UpdateSemverContribTestBase
Base class for Update manager semantic versioning tests of contrib projects.

Namespace

Drupal\Tests\update\Functional

Code

protected function setProjectInstalledVersion($version) {
    $this->mockInstalledExtensionsInfo([
        $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->mockDefaultExtensionsInfo([
        'version' => '8.0.0',
    ]);
}

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