Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
orklah committed Feb 13, 2022
1 parent 954884e commit 9cc82d5
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/EnumTest.php
Expand Up @@ -382,6 +382,29 @@ enum Status: int {
'ignored_issues' => [],
'php_version' => '8.1',
],
'EnumCollapsing' => [
'code' => '<?php
enum Code: int
{
case Ok = 0;
case Fatal = 1;
}
function foo(): int|Code|null
{
return null;
}
$code = foo();
if(!isset($code)){
$code = Code::Ok;
}',
'assertions' => [
'$code' => 'Code|int',
],
'ignored_issues' => [],
'php_version' => '8.1',
],
];
}

Expand Down

0 comments on commit 9cc82d5

Please sign in to comment.