From 084c820716611cdabd524a09f799a489165e86fc Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Wed, 12 Aug 2026 22:08:15 -0500 Subject: [PATCH] test: distinguish PHP diagnostics from prose --- tests/e2e/response-diagnostics.mjs | 2 +- tests/smoke/related-stories-browser-acceptance.test.mjs | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/e2e/response-diagnostics.mjs b/tests/e2e/response-diagnostics.mjs index 549c06d..90a50ff 100644 --- a/tests/e2e/response-diagnostics.mjs +++ b/tests/e2e/response-diagnostics.mjs @@ -1,5 +1,5 @@ export const phpDiagnosticPattern = - /(?:PHP\s+(?:Warning|Notice|Fatal error|Parse error|Deprecated)\b|(?:Warning|Notice|Fatal error|Parse error|Deprecated)\s*:|\s*(?:Warning|Notice|Fatal error|Parse error|Deprecated)\s*<\/b>\s*:)/i; + /(?:PHP\s+)?(?:(?:Warning|Notice|Fatal error|Parse error|Deprecated)|\s*(?:Warning|Notice|Fatal error|Parse error|Deprecated)\s*<\/b>)\s*:/i; export function containsPhpDiagnostic( responseBody ) { return phpDiagnosticPattern.test( responseBody ); diff --git a/tests/smoke/related-stories-browser-acceptance.test.mjs b/tests/smoke/related-stories-browser-acceptance.test.mjs index f767c33..d429bd4 100644 --- a/tests/smoke/related-stories-browser-acceptance.test.mjs +++ b/tests/smoke/related-stories-browser-acceptance.test.mjs @@ -26,6 +26,10 @@ test( 'response diagnostics catch plain and display_errors PHP failures without } for ( const prose of [ + 'PHP Warning signs can make a story more useful.', + 'PHP Notice board hangs beside the door.', + 'PHP Deprecated Futures is the album title.', + 'PHP Fatal error handling belongs at the boundary.', 'Warning signs can make a story more useful.', 'A notice board hangs beside the door.', 'The album Deprecated Futures is available now.',