From 4cec31eba9a76baf919342611dda87bdf89cacc9 Mon Sep 17 00:00:00 2001 From: Evan Shaw Date: Mon, 5 Feb 2024 21:51:34 +1300 Subject: [PATCH] Test for dynamic enum fetch --- tests/ConstantTest.php | 2 +- tests/UnusedVariableTest.php | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/tests/ConstantTest.php b/tests/ConstantTest.php index 06e5cffe7..828f2ea65 100644 --- a/tests/ConstantTest.php +++ b/tests/ConstantTest.php @@ -2485,7 +2485,7 @@ class ConstantTest extends TestCase $a = C::{"A"}; ', 'error_message' => 'ParseError', - 'errors_levels' => [], + 'error_levels' => [], 'php_version' => '8.2', ], ]; diff --git a/tests/UnusedVariableTest.php b/tests/UnusedVariableTest.php index 2b88fbef3..15bf8b182 100644 --- a/tests/UnusedVariableTest.php +++ b/tests/UnusedVariableTest.php @@ -1029,6 +1029,25 @@ class UnusedVariableTest extends TestCase 'ignored_issues' => [], 'php_version' => '8.3', ], + 'usedAsEnumFetch' => [ + 'code' => ' [], + 'ignored_issues' => [], + 'php_version' => '8.3', + ], 'usedAsStaticPropertyAssign' => [ 'code' => '