$config */ $config = config('form_builder.purposes'); $this->assertNotEmpty($config); foreach ($config as $slug => $attrs) { $this->assertArrayHasKey( 'subject_resolver_class', $attrs, "Purpose '{$slug}' is missing the subject_resolver_class config key.", ); } } public function test_registry_resolves_a_subject_resolver_for_every_purpose(): void { $registry = $this->app->make(PurposeRegistry::class); foreach (array_keys($registry->all()) as $slug) { $resolver = $registry->subjectResolverFor($slug); $this->assertInstanceOf(PurposeSubjectResolver::class, $resolver); } } }