function ErrorHandlerTest::assertErrorMessage

Same name and namespace in other branches
  1. 11.x core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php \Drupal\Tests\system\Functional\System\ErrorHandlerTest::assertErrorMessage()
  2. 10 core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php \Drupal\Tests\system\Functional\System\ErrorHandlerTest::assertErrorMessage()
  3. 8.9.x core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php \Drupal\Tests\system\Functional\System\ErrorHandlerTest::assertErrorMessage()

Helper function: assert that the error message is found.

@internal

File

core/modules/system/tests/src/Functional/System/ErrorHandlerTest.php, line 156

Class

ErrorHandlerTest
Performs tests on the Drupal error and exception handler.

Namespace

Drupal\Tests\system\Functional\System

Code

public function assertErrorMessage(array $error) : void {
  $message = new FormattableMarkup('%type: @message in %function (line ', $error);
  $this->assertSession()
    ->responseContains($message);
}

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