Skip to content

Commit a60c4a9

Browse files
committed
Fix tests
1 parent ca85af9 commit a60c4a9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/Type/MixedTypeTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,9 @@ protected static function castValues(bool $normalize): iterable
6868
default => $value,
6969
}
7070
: match (true) {
71-
// Denormalization does not supports enums
72-
$value === UnitEnumStub::ExampleCase => new \ValueError('Passed value "ExampleCase" is invalid'),
73-
$value === IntBackedEnumStub::ExampleCase => new \ValueError('Passed value 3735928559 is invalid'),
74-
$value === StringBackedEnumStub::ExampleCase => new \ValueError('Passed value "case" is invalid'),
71+
$value === UnitEnumStub::ExampleCase => UnitEnumStub::ExampleCase,
72+
$value === IntBackedEnumStub::ExampleCase => IntBackedEnumStub::ExampleCase,
73+
$value === StringBackedEnumStub::ExampleCase => StringBackedEnumStub::ExampleCase,
7574
default => $value,
7675
};
7776
}

0 commit comments

Comments
 (0)