2626use Symfony \Component \Validator \Constraint ;
2727use Symfony \Component \Validator \Constraints \AtLeastOneOf ;
2828use Symfony \Component \Validator \Constraints \Length ;
29+ use Symfony \Component \Validator \Constraints \NotBlank ;
2930use Symfony \Component \Validator \Constraints \Positive ;
3031
3132/**
@@ -65,7 +66,7 @@ public static function supportsProvider(): \Generator
6566 return ;
6667 }
6768
68- yield 'supported ' => [new AtLeastOneOf ([]), new ApiProperty (), true ];
69+ yield 'supported ' => [new AtLeastOneOf ([new NotBlank () ]), new ApiProperty (), true ];
6970 yield 'not supported ' => [new Positive (), new ApiProperty (), false ];
7071 }
7172
@@ -75,7 +76,7 @@ public static function supportsProviderWithNativeType(): \Generator
7576 return ;
7677 }
7778
78- yield 'native type: supported ' => [new AtLeastOneOf ([]), (new ApiProperty ())->withNativeType (Type::mixed ()), true ];
79+ yield 'native type: supported ' => [new AtLeastOneOf ([new NotBlank () ]), (new ApiProperty ())->withNativeType (Type::mixed ()), true ];
7980 yield 'native type: not supported ' => [new Positive (), (new ApiProperty ())->withNativeType (Type::mixed ()), false ];
8081 }
8182
@@ -95,7 +96,6 @@ public function testCreateWithNativeType(AtLeastOneOf $constraint, ApiProperty $
9596
9697 public static function createProvider (): \Generator
9798 {
98- yield 'empty ' => [new AtLeastOneOf ([]), new ApiProperty (), []];
9999 yield 'not supported constraints ' => [new AtLeastOneOf ([new Positive (), new Length (min: 3 )]), new ApiProperty (), []];
100100 yield 'one supported constraint ' => [new AtLeastOneOf ([new Positive (), new Length (min: 3 )]), (new ApiProperty ())->withBuiltinTypes ([new LegacyType (LegacyType::BUILTIN_TYPE_STRING )]), [
101101 'oneOf ' => [['minLength ' => 3 ]],
@@ -104,7 +104,6 @@ public static function createProvider(): \Generator
104104
105105 public static function createProviderWithNativeType (): \Generator
106106 {
107- yield 'native type: empty ' => [new AtLeastOneOf ([]), new ApiProperty (), []];
108107 yield 'native type: not supported constraints ' => [new AtLeastOneOf ([new Positive (), new Length (min: 3 )]), new ApiProperty (), []];
109108 yield 'native type: one supported constraint ' => [new AtLeastOneOf ([new Positive (), new Length (min: 3 )]), (new ApiProperty ())->withNativeType (Type::string ()), [
110109 'oneOf ' => [['minLength ' => 3 ]],
0 commit comments