You are here

private function ReadinessValidationTest::assertReadinessReportMatches in Automatic Updates 8.2

Asserts status report readiness report item matches a format.

Parameters

string $format: The string to match.

string $section: The section of the status report in which the string should appear.

string $message_prefix: The prefix for before the string.

3 calls to ReadinessValidationTest::assertReadinessReportMatches()
ReadinessValidationTest::testReadinessCheckAfterInstall in tests/src/Functional/ReadinessValidationTest.php
Tests installing a module with a checker before installing automatic_updates.
ReadinessValidationTest::testReadinessChecksAdminPages in tests/src/Functional/ReadinessValidationTest.php
Tests readiness checkers results on admin pages..
ReadinessValidationTest::testReadinessChecksStatusReport in tests/src/Functional/ReadinessValidationTest.php
Tests readiness checkers on status report page.

File

tests/src/Functional/ReadinessValidationTest.php, line 380

Class

ReadinessValidationTest
Tests readiness validation.

Namespace

Drupal\Tests\automatic_updates\Functional

Code

private function assertReadinessReportMatches(string $format, string $section = 'error', string $message_prefix = '') : void {
  $format = 'Update readiness checks ' . ($message_prefix ? "{$message_prefix} " : '') . $format;
  $text = $this
    ->getSession()
    ->getPage()
    ->find('css', "h3#{$section} ~ details.system-status-report__entry:contains('Update readiness checks')")
    ->getText();
  $this
    ->assertStringMatchesFormat($format, $text);
}