function UpdateSemverTestSecurityAvailabilityTrait::doTestSecurityUpdateAvailability

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

Tests the Update Manager module when a security update is available.

Parameters

string $site_patch_version: The patch version to set the site to for testing.

string[] $expected_security_releases: The security releases, if any, that the status report should recommend.

string $expected_update_message_type: The type of update message expected.

string $fixture: The test fixture that contains the test XML.

1 call to UpdateSemverTestSecurityAvailabilityTrait::doTestSecurityUpdateAvailability()
UpdateSemverTestSecurityAvailabilityTrait::testSecurityUpdateAvailability in core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php
Tests the update manager when a security update is available.

File

core/modules/update/tests/src/Functional/UpdateSemverTestSecurityAvailabilityTrait.php, line 33

Class

UpdateSemverTestSecurityAvailabilityTrait
Provides a test and data provider for semver security availability tests.

Namespace

Drupal\Tests\update\Functional

Code

protected function doTestSecurityUpdateAvailability($site_patch_version, array $expected_security_releases, $expected_update_message_type, $fixture) : void {
    $this->setProjectInstalledVersion("8.{$site_patch_version}");
    $this->refreshUpdateStatus([
        $this->updateProject => $fixture,
    ]);
    $this->assertSecurityUpdates("{$this->updateProject}-8", $expected_security_releases, $expected_update_message_type, $this->updateTableLocator);
}

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