$config */ $config = config('form_builder.purposes'); $this->assertNotEmpty($config); foreach ($config as $slug => $attrs) { $this->assertArrayHasKey( 'guards_class', $attrs, "Purpose '{$slug}' is missing the guards_class config key.", ); } } public function test_registry_resolves_provider_for_every_purpose(): void { $registry = $this->app->make(PurposeRegistry::class); foreach (array_keys($registry->all()) as $slug) { $provider = $registry->guardProviderFor($slug); $this->assertInstanceOf(PurposeGuardProvider::class, $provider); $this->assertNotEmpty( $provider->publishGuards(), "Provider for '{$slug}' returned no guards.", ); } } }