Skip to content

Commit

Permalink
add test to ensure https://psalm.dev/r/323e33ae8a will be a non-falsy…
Browse files Browse the repository at this point in the history
…-string
  • Loading branch information
kkmuffme committed Dec 20, 2023
1 parent 6d35341 commit a38fe2c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/BinaryOperationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,14 @@ public function providerValidCodeParse(): iterable
'code' => '<?php
$a = "Hey " . "Jude,";',
],
'concatenationNonFalsyLiteralStringWithString' => [
'code' => '<?php
function foo(): string {}
$a = "Hey " . foo();',
'assertions' => [
'$a===' => 'non-falsy-string',
],
],
'concatenationWithNumberInWeakMode' => [
'code' => '<?php
$a = "hi" . 5;',
Expand Down

0 comments on commit a38fe2c

Please sign in to comment.