Skip to content

Commit

Permalink
Test for dynamic enum fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
edsrzf committed Feb 5, 2024
1 parent a827806 commit b11b658
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tests/UnusedVariableTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1029,6 +1029,25 @@ public function foo() : void {
'ignored_issues' => [],
'php_version' => '8.3',
],
'usedAsEnumFetch' => [
'code' => '<?php
enum E {
case C;
}
class A {
public function foo() : void {
$var = "C";
if (rand(0, 1)) {
E::{$var};
}
}
}',
'assertions' => [],
'ignored_issues' => [],
'php_version' => '8.3',
],
'usedAsStaticPropertyAssign' => [
'code' => '<?php
class A {
Expand Down

0 comments on commit b11b658

Please sign in to comment.