Skip to content

Commit f635b0e

Browse files
committed
more tests
1 parent f932dab commit f635b0e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/PHPStan/Analyser/nsrt/bug-7387.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,14 @@ public function positionalArgs($mixed, int $i, float $f, string $s, int $posInt,
5757
assertType('non-falsy-string&numeric-string', sprintf('%2$14s', $mixed, $posInt));
5858
assertType('non-falsy-string&numeric-string', sprintf('%2$14s', $mixed, $negInt));
5959
assertType('numeric-string', sprintf('%2$14s', $mixed, $intRange));
60+
assertType('non-falsy-string&numeric-string', sprintf('%2$14s', $mixed, $nonZeroIntRange));
61+
62+
assertType("non-falsy-string", sprintf('%2$14s', $mixed, 1));
6063
assertType("non-falsy-string", sprintf('%2$14s', $mixed, '1'));
64+
assertType("non-falsy-string", sprintf('%2$14s', $mixed, 'abc'));
65+
assertType("'1'", sprintf('%2$s', $mixed, 1));
6166
assertType("'1'", sprintf('%2$s', $mixed, '1'));
62-
assertType('non-falsy-string&numeric-string', sprintf('%2$14s', $mixed, $nonZeroIntRange));
67+
assertType("'abc'", sprintf('%2$s', $mixed, 'abc'));
6368

6469
assertType('numeric-string', sprintf('%2$.14F', $mixed, $i));
6570
assertType('numeric-string', sprintf('%2$.14F', $mixed, $f));

0 commit comments

Comments
 (0)