$enum * @test * @dataProvider provideEnums */ public function enumValuesReturnsExpectedValueForEnum(string $enum, array $expectedValues): void { self::assertEquals($expectedValues, enumValues($enum)); } public static function provideEnums(): iterable { yield EnvVars::class => [EnvVars::class, map(EnvVars::cases(), static fn (EnvVars $envVar) => $envVar->value)]; yield VisitType::class => [ VisitType::class, map(VisitType::cases(), static fn (VisitType $envVar) => $envVar->value), ]; yield DeviceType::class => [ DeviceType::class, map(DeviceType::cases(), static fn (DeviceType $envVar) => $envVar->value), ]; yield OrderableField::class => [ OrderableField::class, map(OrderableField::cases(), static fn (OrderableField $envVar) => $envVar->value), ]; } }