You are here

public function UpdateSemverTestBase::testSecurityUpdateAvailability in Drupal 10

Same name and namespace in other branches
  1. 9 core/modules/update/tests/src/Functional/UpdateSemverTestBase.php \Drupal\Tests\update\Functional\UpdateSemverTestBase::testSecurityUpdateAvailability()

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

@dataProvider securityUpdateAvailabilityProvider

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.

File

core/modules/update/tests/src/Functional/UpdateSemverTestBase.php, line 184

Class

UpdateSemverTestBase
Common test methods for projects that use semver version releases.

Namespace

Drupal\Tests\update\Functional

Code

public function testSecurityUpdateAvailability($site_patch_version, array $expected_security_releases, $expected_update_message_type, $fixture) {
  $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);
}