Skip to content

Commit

Permalink
Merge pull request pestphp#592 from dansysanalyst/fix_windows_backtrace
Browse files Browse the repository at this point in the history
[2.x] Fix Backtrace cross-plataform compatibility
  • Loading branch information
nunomaduro authored Sep 28, 2022
2 parents f214a78 + 129325d commit 3d16183
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Support/Backtrace.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ public static function testFile(): string
foreach (debug_backtrace(self::BACKTRACE_OPTIONS) as $trace) {
assert(array_key_exists(self::FILE, $trace));

if (Str::endsWith($trace[self::FILE], 'overrides/Runner/TestSuiteLoader.php')) {
$traceFile = str_replace(DIRECTORY_SEPARATOR, '/', $trace[self::FILE]);

if (Str::endsWith($traceFile, 'overrides/Runner/TestSuiteLoader.php')) {
break;
}

Expand Down

0 comments on commit 3d16183

Please sign in to comment.