From a0fca4daa8ee1ba398f4ed1449ef627043261e39 Mon Sep 17 00:00:00 2001 From: Ollie Read Date: Mon, 16 Dec 2024 12:00:49 +0000 Subject: [PATCH] test: Add tests for identity resolver custom creators --- tests/Unit/Managers/IdentityResolverManagerTest.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Unit/Managers/IdentityResolverManagerTest.php b/tests/Unit/Managers/IdentityResolverManagerTest.php index bbf34a5..136bc71 100644 --- a/tests/Unit/Managers/IdentityResolverManagerTest.php +++ b/tests/Unit/Managers/IdentityResolverManagerTest.php @@ -176,6 +176,16 @@ public function allowsCustomCreators(): void $manager = sprout()->resolvers(); - $this->markTestSkipped(); + $this->assertTrue($manager->hasDriver('hello-there')); + $this->assertFalse($manager->hasResolved('path')); + $this->assertFalse($manager->hasResolved('subdomain')); + + $resolver = $manager->get('path'); + + $this->assertInstanceOf(SubdomainIdentityResolver::class, $resolver); + $this->assertSame('hello-there', $resolver->getName()); + $this->assertSame('somedomain.local', $resolver->getDomain()); + $this->assertTrue($manager->hasResolved('path')); + $this->assertFalse($manager->hasResolved('subdomain')); } }