From c9f4d5ccf9fd4a7fc97a18d785c48a489b24a59d Mon Sep 17 00:00:00 2001 From: Joey Smith Date: Fri, 9 Oct 2026 21:05:55 -0500 Subject: [PATCH] test: assert the resolved template path in the platform separator The resolver returns a native absolute path, so the forward-slash suffix only matched on POSIX. The suffix is now converted to the platform separator before the comparison. Signed-off-by: Joey Smith Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../Container/AggregateResolverFactoryTest.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/test/unit/Resolver/Container/AggregateResolverFactoryTest.php b/test/unit/Resolver/Container/AggregateResolverFactoryTest.php index 4d7957c..bd71f14 100644 --- a/test/unit/Resolver/Container/AggregateResolverFactoryTest.php +++ b/test/unit/Resolver/Container/AggregateResolverFactoryTest.php @@ -26,6 +26,10 @@ use Webware\Theme\Resolver\Container\AggregateResolverFactory; use Webware\Theme\Resolver\ThemeResolver; +use function str_replace; + +use const DIRECTORY_SEPARATOR; + #[CoversClass(AggregateResolverFactory::class)] #[CoversMethod(AggregateResolverFactory::class, '__invoke')] final class AggregateResolverFactoryTest extends TestCase @@ -38,7 +42,11 @@ public function theNamespacedPathStackAnswersWhatNeitherElseCarries(): void $aggregate = $this->build([], []); static::assertStringEndsWith( - '/themes/default/app/home-page.phtml', + str_replace( + search : '/', + replace: DIRECTORY_SEPARATOR, + subject: '/themes/default/app/home-page.phtml', + ), (string) $aggregate->resolve('app::home-page.phtml'), ); }