test: distinguish PHP diagnostics from prose
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -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*:|<b>\s*(?:Warning|Notice|Fatal error|Parse error|Deprecated)\s*<\/b>\s*:)/i;
|
||||
/(?:PHP\s+)?(?:(?:Warning|Notice|Fatal error|Parse error|Deprecated)|<b>\s*(?:Warning|Notice|Fatal error|Parse error|Deprecated)\s*<\/b>)\s*:/i;
|
||||
|
||||
export function containsPhpDiagnostic( responseBody ) {
|
||||
return phpDiagnosticPattern.test( responseBody );
|
||||
|
||||
Reference in new issue
Block a user