function UpdateContribTest::doTestSecurityUpdateAvailability

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

Tests update status of security releases.

Parameters

string $module_version: The module version the site is using.

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 fixture file to use.

1 call to UpdateContribTest::doTestSecurityUpdateAvailability()
UpdateContribTest::testSecurityUpdateAvailability in core/modules/update/tests/src/Functional/UpdateContribTest.php
Tests update status of security releases.

File

core/modules/update/tests/src/Functional/UpdateContribTest.php, line 607

Class

UpdateContribTest
Tests how the Update Manager handles contributed modules and themes.

Namespace

Drupal\Tests\update\Functional

Code

protected function doTestSecurityUpdateAvailability($module_version, array $expected_security_releases, $expected_update_message_type, $fixture) : void {
    $this->mockInstalledExtensionsInfo([
        'aaa_update_test' => [
            'project' => 'aaa_update_test',
            'version' => $module_version,
            'hidden' => FALSE,
        ],
    ]);
    $this->mockDefaultExtensionsInfo([
        'version' => '8.0.0',
    ]);
    $this->refreshUpdateStatus([
        'drupal' => '8.0.0',
        'aaa_update_test' => $fixture,
    ]);
    $this->assertSecurityUpdates('aaa_update_test', $expected_security_releases, $expected_update_message_type, 'table.update:nth-of-type(2)');
}

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