You are here

function ErrorHandlerTest::assertErrorMessage in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/System/ErrorHandlerTest.php \Drupal\system\Tests\System\ErrorHandlerTest::assertErrorMessage()

Helper function: assert that the error message is found.

2 calls to ErrorHandlerTest::assertErrorMessage()
ErrorHandlerTest::testErrorHandler in core/modules/system/src/Tests/System/ErrorHandlerTest.php
Test the error handler.
ErrorHandlerTest::testExceptionHandler in core/modules/system/src/Tests/System/ErrorHandlerTest.php
Test the exception handler.

File

core/modules/system/src/Tests/System/ErrorHandlerTest.php, line 190
Contains \Drupal\system\Tests\System\ErrorHandlerTest.

Class

ErrorHandlerTest
Performs tests on the Drupal error and exception handler.

Namespace

Drupal\system\Tests\System

Code

function assertErrorMessage(array $error) {
  $message = t('%type: @message in %function (line ', $error);
  $this
    ->assertRaw($message, format_string('Found error message: @message.', array(
    '@message' => $message,
  )));
}