Skip to content

Commit

Permalink
test: run normalizer enum tests only with PHP 8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
romm committed Oct 7, 2023
1 parent 8cd61a0 commit 6f59f02
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions tests/Integration/Normalizer/NormalizerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,22 @@ public function normalize_basic_values_yields_expected_output_data_provider(): i
],
];

yield 'unit enum' => [
'input' => PureEnum::FOO,
'expected' => 'FOO',
];

yield 'backed string enum' => [
'input' => BackedStringEnum::FOO,
'expected' => 'foo',
];

yield 'backed integer enum' => [
'input' => BackedIntegerEnum::FOO,
'expected' => 42,
];
if (PHP_VERSION_ID >= 8_01_00) {
yield 'unit enum' => [
'input' => PureEnum::FOO,
'expected' => 'FOO',
];

yield 'backed string enum' => [
'input' => BackedStringEnum::FOO,
'expected' => 'foo',
];

yield 'backed integer enum' => [
'input' => BackedIntegerEnum::FOO,
'expected' => 42,
];
}

yield 'class with public properties' => [
'input' => new class () {
Expand Down

0 comments on commit 6f59f02

Please sign in to comment.