You are here

protected function RequirementsPageTrait::updateRequirementsProblem in Drupal 10

Same name and namespace in other branches
  1. 8 core/tests/Drupal/Tests/RequirementsPageTrait.php \Drupal\Tests\RequirementsPageTrait::updateRequirementsProblem()
  2. 9 core/tests/Drupal/Tests/RequirementsPageTrait.php \Drupal\Tests\RequirementsPageTrait::updateRequirementsProblem()

Handles the update requirements page.

16 calls to RequirementsPageTrait::updateRequirementsProblem()
InvalidUpdateHookTest::testInvalidUpdateHook in core/modules/system/tests/src/Functional/UpdateSystem/InvalidUpdateHookTest.php
MaintenanceThemeUpdateRegistryTest::testMaintenanceThemeUpdateRegistration in core/modules/system/tests/src/Functional/Theme/MaintenanceThemeUpdateRegistryTest.php
Tests that after installing the profile there are no outstanding updates.
NoPreExistingSchemaUpdateTest::testNoPreExistingSchema in core/modules/system/tests/src/Functional/UpdateSystem/NoPreExistingSchemaUpdateTest.php
Tests the system module updates with no dependencies installed.
UpdateCacheTest::testCaches in core/modules/system/tests/src/Functional/UpdateSystem/UpdateCacheTest.php
Tests that caches are cleared during updates.
UpdatePathTestTrait::runUpdates in core/tests/Drupal/Tests/UpdatePathTestTrait.php
Helper function to run pending database updates.

... See full list

File

core/tests/Drupal/Tests/RequirementsPageTrait.php, line 15

Class

RequirementsPageTrait
Provides helper methods for the requirements page.

Namespace

Drupal\Tests

Code

protected function updateRequirementsProblem() {

  // Assert a warning is shown on older test environments.
  $links = $this
    ->getSession()
    ->getPage()
    ->findAll('named', [
    'link',
    'try again',
  ]);

  // Get the default Drupal core PHP requirements.
  if ($links && version_compare(phpversion(), PhpRequirements::getMinimumSupportedPhp()) < 0) {
    $this
      ->assertSession()
      ->pageTextNotContains('Errors found');
    $this
      ->assertWarningSummaries([
      'PHP',
    ]);
    $this
      ->clickLink('try again');
    $this
      ->checkForMetaRefresh();
  }
}