File tree Expand file tree Collapse file tree 2 files changed +2
-5
lines changed
Expand file tree Collapse file tree 2 files changed +2
-5
lines changed Original file line number Diff line number Diff line change 55namespace Tempest \View ;
66
77use function Tempest \Support \path ;
8+ use function Tempest \Support \Path \normalize ;
89
910/** @phpstan-require-implements \Tempest\View\View */
1011trait IsView
@@ -24,7 +25,7 @@ public function __construct(
2425
2526 $ trace = debug_backtrace (DEBUG_BACKTRACE_IGNORE_ARGS );
2627
27- if (str_ends_with ($ trace [0 ]['file ' ], 'view/src/functions.php ' )) {
28+ if (str_ends_with (normalize ( $ trace [0 ]['file ' ]) , 'view/src/functions.php ' )) {
2829 $ this ->relativeRootPath = path ($ trace [1 ]['file ' ])->dirname ()->toString ();
2930 } else {
3031 $ this ->relativeRootPath = path ($ trace [0 ]['file ' ])->dirname ()->toString ();
Original file line number Diff line number Diff line change @@ -53,10 +53,6 @@ public function test_view_renderer(): void
5353
5454 public function test_relative_view_path_rendering (): void
5555 {
56- if (PHP_OS_FAMILY === 'Windows ' ) {
57- $ this ->markTestSkipped ('Relative paths not supported on Windows ' );
58- }
59-
6056 $ this ->http
6157 ->get (uri ([RelativeViewController::class, 'asFunction ' ]))
6258 ->assertOk ()
You can’t perform that action at this time.
0 commit comments