function RequirementsPageTrait::continueOnExpectedWarnings

Same name in other branches
  1. 9 core/tests/Drupal/Tests/RequirementsPageTrait.php \Drupal\Tests\RequirementsPageTrait::continueOnExpectedWarnings()
  2. 8.9.x core/tests/Drupal/Tests/RequirementsPageTrait.php \Drupal\Tests\RequirementsPageTrait::continueOnExpectedWarnings()
  3. 11.x core/tests/Drupal/Tests/RequirementsPageTrait.php \Drupal\Tests\RequirementsPageTrait::continueOnExpectedWarnings()

Continues installation when the expected warnings are found.

Parameters

string[] $expected_warnings: A list of warning summaries to expect on the requirements screen (e.g. 'PHP', 'PHP OPcode caching', etc.). If only the expected warnings are found, the test will click the "continue anyway" link to go to the next screen of the installer. If an expected warning is not found, or if a warning not in the list is present, a fail is raised.

1 call to RequirementsPageTrait::continueOnExpectedWarnings()
InstallerTestBase::setUpRequirementsProblem in core/tests/Drupal/FunctionalTests/Installer/InstallerTestBase.php
Installer step: Requirements problem.

File

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

Class

RequirementsPageTrait
Provides helper methods for the requirements page.

Namespace

Drupal\Tests

Code

protected function continueOnExpectedWarnings($expected_warnings = []) {
    $this->assertSession()
        ->pageTextNotContains('Errors found');
    $this->assertWarningSummaries($expected_warnings);
    $this->clickLink('continue anyway');
    $this->checkForMetaRefresh();
}

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