Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Dec 23, 2024
1 parent 7cc7b73 commit 39d559d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/PHPStan/Analyser/nsrt/bug-12312.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ public function sayLowercase(string $s): void
if ($s != '') {
assertType('lowercase-string&non-empty-string', $s);
}
if ('' != $s) {
assertType('lowercase-string&non-empty-string', $s);
}
assertType('lowercase-string', $s);
}

Expand All @@ -25,6 +28,9 @@ public function sayUppercase(string $s): void
if ($s != '') {
assertType('non-empty-string&uppercase-string', $s);
}
if ('' != $s) {
assertType('non-empty-string&uppercase-string', $s);
}
assertType('uppercase-string', $s);
}

Expand All @@ -36,6 +42,9 @@ public function sayBoth(string $s): void
if ($s != '') {
assertType('lowercase-string&non-empty-string&uppercase-string', $s);
}
if ('' != $s) {
assertType('lowercase-string&non-empty-string&uppercase-string', $s);
}
assertType('lowercase-string&uppercase-string', $s);
}
}

0 comments on commit 39d559d

Please sign in to comment.