1 parent da7a700 commit d11cab4Copy full SHA for d11cab4
1 file changed
tests/system/Database/Live/ExecuteLogMessageFormatTest.php
@@ -62,7 +62,16 @@ public function testLogMessageWhenExecuteFailsShowFullStructuredBacktrace(): voi
62
$messageFromLogs = array_slice($messageFromLogs, 2);
63
}
64
65
- $this->assertMatchesRegularExpression('/^in \S+ on line \d+\.$/', array_shift($messageFromLogs));
+ $inLine = null;
66
+
67
+ while (($line = array_shift($messageFromLogs)) !== null) {
68
+ if (preg_match('/^in \S+ on line \d+\.$/', $line)) {
69
+ $inLine = $line;
70
+ break;
71
+ }
72
73
74
+ $this->assertNotNull($inLine, 'Could not find "in ... on line ..." in log message');
75
76
foreach ($messageFromLogs as $line) {
77
$this->assertMatchesRegularExpression('/^\s*\d* .+(?:\(\d+\))?: \S+(?:(?:\->|::)\S+)?\(.*\)$/', $line);
0 commit comments