Skip to content

Commit

Permalink
minor symfony#57837 [PropertyInfo] fix tests (xabbuh)
Browse files Browse the repository at this point in the history
This PR was merged into the 7.2 branch.

Discussion
----------

[PropertyInfo] fix tests

| Q             | A
| ------------- | ---
| Branch?       | 7.2
| Bug fix?      | no
| New feature?  | no
| Deprecations? | no
| Issues        |
| License       | MIT

Commits
-------

28b0ba0 fix tests
  • Loading branch information
xabbuh committed Jul 26, 2024
2 parents b360af7 + 28b0ba0 commit da90fe7
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
use Symfony\Component\PropertyInfo\Tests\Fixtures\SnakeCaseDummy;
use Symfony\Component\PropertyInfo\Type as LegacyType;
use Symfony\Component\TypeInfo\Type;
use Symfony\Component\TypeInfo\TypeResolver\PhpDocAwareReflectionTypeResolver;

/**
* @author Kévin Dunglas <[email protected]>
Expand Down Expand Up @@ -698,9 +697,9 @@ public function testExtractors(string $property, ?Type $type)
*/
public static function typesProvider(): iterable
{
yield ['a', class_exists(PhpDocAwareReflectionTypeResolver::class) ? Type::int() : null];
yield ['a', null];
yield ['b', Type::nullable(Type::object(ParentDummy::class))];
yield ['e', class_exists(PhpDocAwareReflectionTypeResolver::class) ? Type::list(Type::resource()) : null];
yield ['e', null];
yield ['f', Type::list(Type::object(\DateTimeImmutable::class))];
yield ['donotexist', null];
yield ['staticGetter', null];
Expand Down Expand Up @@ -883,8 +882,8 @@ public function testExtractConstructorType(string $property, ?Type $type)
public static function extractConstructorTypesProvider(): iterable
{
yield ['timezone', Type::object(\DateTimeZone::class)];
yield ['date', class_exists(PhpDocAwareReflectionTypeResolver::class) ? Type::int() : null];
yield ['dateObject', class_exists(PhpDocAwareReflectionTypeResolver::class) ? Type::object(\DateTimeInterface::class) : null];
yield ['date', null];
yield ['dateObject', null];
yield ['dateTime', Type::object(\DateTimeImmutable::class)];
yield ['ddd', null];
}
Expand Down

0 comments on commit da90fe7

Please sign in to comment.