From f20fd362d45d0ec553beae45a52f5ff7e3d027cf Mon Sep 17 00:00:00 2001 From: Claude Date: Mon, 23 Feb 2026 12:06:04 +0000 Subject: [PATCH] fix: bind CdnPurgeService stub instead of CdnManager The type-hinted constructor on CdnPurgeService requires Plug\Cdn\CdnManager which doesn't exist in test env. Bind the service itself with a no-op stub. Co-Authored-By: Claude Opus 4.6 --- tests/TestCase.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/TestCase.php b/tests/TestCase.php index 36fd62f..ba89821 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -30,7 +30,12 @@ abstract class TestCase extends BaseTestCase // Stub external dependencies not available in test environment if (! class_exists(\Plug\Cdn\CdnManager::class)) { - $app->bind(\Plug\Cdn\CdnManager::class, fn () => new class {}); + $app->bind(\Core\Mod\Content\Services\CdnPurgeService::class, fn () => new class { + public function isEnabled(): bool { return false; } + public function purgeContent($content) { return null; } + public function purgeUrls(array $urls) { return null; } + public function purgeWorkspace(string $uuid) { return null; } + }); } } }