function UpdateTestBase::confirmRevokedStatus

Same name in other branches
  1. 8.9.x core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::confirmRevokedStatus()
  2. 10 core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::confirmRevokedStatus()
  3. 11.x core/modules/update/tests/src/Functional/UpdateTestBase.php \Drupal\Tests\update\Functional\UpdateTestBase::confirmRevokedStatus()

Confirms messages are correct when a release has been unpublished/revoked.

Parameters

string $revoked_version: The revoked version that is currently installed.

string $newer_version: The expected newer version to recommend.

string $new_version_label: The expected label for the newer version (for example 'Recommended version:' or 'Also available:').

2 calls to UpdateTestBase::confirmRevokedStatus()
UpdateContribTest::testRevokedRelease in core/modules/update/tests/src/Functional/UpdateContribTest.php
Tests messages when a project release is unpublished.
UpdateSemverTestBase::testRevokedRelease in core/modules/update/tests/src/Functional/UpdateSemverTestBase.php
Tests messages when a project release is unpublished.

File

core/modules/update/tests/src/Functional/UpdateTestBase.php, line 186

Class

UpdateTestBase
Defines some shared functions used by all update tests.

Namespace

Drupal\Tests\update\Functional

Code

protected function confirmRevokedStatus($revoked_version, $newer_version, $new_version_label) {
    $this->drupalGet('admin/reports/updates');
    $this->clickLink('Check manually');
    $this->checkForMetaRefresh();
    $this->assertUpdateTableTextContains('Revoked!');
    $this->assertUpdateTableTextContains($revoked_version);
    $this->assertUpdateTableElementContains('error.svg');
    $this->assertUpdateTableTextContains('Release revoked: Your currently installed release has been revoked, and is no longer available for download. Disabling everything included in this release or upgrading is strongly recommended!');
    $this->assertVersionUpdateLinks($new_version_label, $newer_version);
}

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