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 edc7160 commit e717ac6
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/EnumTest.php
Expand Up @@ -405,6 +405,32 @@ function foo(): int|Code|null
'ignored_issues' => [],
'php_version' => '8.1',
],
'EnumCaseReconciliation' => [
'code' => '<?php
enum Code: int
{
case Ok = 0;
case Fatal = 1;
}
function foo(): Code|null
{
return null;
}
$code = foo();
if($code instanceof Code){
$code1 = $code;
} else {
$code2 = $code;
}',
'assertions' => [
'$code1' => 'Code|Code::Ok',
'$code2' => 'never',
],
'ignored_issues' => [],
'php_version' => '8.1',
],
];
}

Expand Down

0 comments on commit e717ac6

Please sign in to comment.