You are here

protected function TaxonomyAccessFixFallbackRequirementsPageTrait::continueOnExpectedWarnings in Taxonomy access fix 8.2

Continues installation when the expected warnings are found.

This function is no longer called by any core test, but it is retained for use by contrib/custom tests. It is not deprecated, because it remains the recommended function to call for its purpose.

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.

File

tests/src/Traits/TaxonomyAccessFixFallbackRequirementsPageTrait.php, line 39

Class

TaxonomyAccessFixFallbackRequirementsPageTrait
Provides a fallback for RequirementsPageTrait added in Drupal Core 8.7.

Namespace

Drupal\Tests\taxonomy_access_fix\Traits

Code

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