trait RequirementsPageTrait
{ /**
* Handles the update requirements page.
*/
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();
} } /**
* Continues installation when the expected warnings are found.
*
* @param 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.
*/