diff --git a/core/lib/Drupal/Core/Test/TestDiscovery.php b/core/lib/Drupal/Core/Test/TestDiscovery.php index 1c319dfcab..c6e3610ca2 100644 --- a/core/lib/Drupal/Core/Test/TestDiscovery.php +++ b/core/lib/Drupal/Core/Test/TestDiscovery.php @@ -395,7 +395,7 @@ public static function getTestInfo($classname, $doc_comment = NULL) { */ public static function parseTestClassSummary($doc_comment) { // Normalize line endings. - $doc_comment = preg_replace('/\r\n|\r/', '\n', $doc_comment); + $doc_comment = str_replace(['\r\n', '\r'], ['\n', '\n'], $doc_comment); // Strip leading and trailing doc block lines. $doc_comment = substr($doc_comment, 4, -4);