diff --git a/core/modules/system/src/Tests/System/ErrorHandlerTest.php b/core/modules/system/src/Tests/System/ErrorHandlerTest.php index 844b08e..9d1437f 100644 --- a/core/modules/system/src/Tests/System/ErrorHandlerTest.php +++ b/core/modules/system/src/Tests/System/ErrorHandlerTest.php @@ -49,7 +49,7 @@ function testErrorHandler() { $fatal_error = array( '%type' => 'Recoverable fatal error', '%function' => 'Drupal\error_test\Controller\ErrorTestController->Drupal\error_test\Controller\{closure}()', - '!message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in /Users/dawehner/www/d8/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66 and defined', + '!message' => 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in ' . \Drupal::root() . '/core/modules/system/tests/modules/error_test/src/Controller/ErrorTestController.php on line 66 and defined', ); // Set error reporting to display verbose notices. @@ -68,9 +68,10 @@ function testErrorHandler() { $this->assertErrorMessage($fatal_error); $this->assertRaw('
', 'Found pre element with backtrace class.');
- // Remove the fatal error from the assertions, its wanted here.
+ // Remove the fatal error from the assertions, its wanted here. Ensure
+ // that we just remove the one recoverable fatal error.
foreach ($this->assertions as $key => $assertion) {
- if (strpos($assertion['message'], 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in') !== FALSE) {
+ if ($assertion['message_group'] == 'Recoverable fatal error' && strpos($assertion['message'], 'Argument 1 passed to Drupal\error_test\Controller\ErrorTestController::Drupal\error_test\Controller\{closure}() must be of the type array, string given, called in') !== FALSE) {
unset($this->assertions[$key]);
$this->deleteAssert($assertion['message_id']);
}