You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/Utils/UnifiedDiffAssertTrait.php
+3
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ public function assertValidUnifiedDiffFormat($diff)
27
27
28
28
// test diff ends with a line break
29
29
$last = \substr($diff, -1);
30
+
30
31
if ("\n" !== $last && "\r" !== $last) {
31
32
thrownew \UnexpectedValueException(\sprintf('Expected diff to end with a line break, got "%s".', $last));
32
33
}
@@ -130,6 +131,7 @@ public function assertValidUnifiedDiffFormat($diff)
130
131
}
131
132
132
133
$previousType = $this->unifiedDiffAssertLinePrefix($lines[$lineNumber - 2], \sprintf('Preceding line of "\\ No newline at end of file" of unexpected format. Line %d.', $lineNumber));
134
+
133
135
if (isset($endOfLineTypes[$previousType])) {
134
136
thrownew \UnexpectedValueException(\sprintf('Unexpected "\\ No newline at end of file", "%s" was already closed. Line %d.', $type, $lineNumber));
135
137
}
@@ -190,6 +192,7 @@ private function unifiedDiffAssertLinePrefix($line, $message)
0 commit comments