*/ public static function configValueProvider(): array { return [ 'boolean true' => [true, RegistrationMode::On], 'on' => ['on', RegistrationMode::On], 'true' => ['true', RegistrationMode::On], 'invite' => ['invite', RegistrationMode::InviteOnly], 'invite-only' => ['invite-only', RegistrationMode::InviteOnly], 'boolean false' => [false, RegistrationMode::Off], 'off' => ['off', RegistrationMode::Off], 'false' => ['false', RegistrationMode::Off], 'unknown' => ['unknown', RegistrationMode::Off], ]; } #[DataProvider('configValueProvider')] public function test_registration_mode_is_created_from_config_value(mixed $value, RegistrationMode $expected): void { $this->assertSame($expected, RegistrationMode::fromConfig($value)); } }