Skip to content

Commit d326bbe

Browse files
committed
adjust tests
1 parent f21db2b commit d326bbe

File tree

5 files changed

+14
-15
lines changed

5 files changed

+14
-15
lines changed

tests/PHPStan/Analyser/LegacyNodeScopeResolverTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5594,19 +5594,19 @@ public static function dataRangeFunction(): array
55945594
'range(2.1, 5)',
55955595
],
55965596
[
5597-
'list<int>',
5597+
'non-empty-list<int>',
55985598
'range(2, 5, $integer)',
55995599
],
56005600
[
5601-
'list<float|int>',
5601+
'non-empty-list<float|int>',
56025602
'range($float, 5, $integer)',
56035603
],
56045604
[
5605-
'list<(float|int|string)>',
5605+
'non-empty-list<(float|int|string)>',
56065606
'range($float, $mixed, $integer)',
56075607
],
56085608
[
5609-
'list<(float|int|string)>',
5609+
'non-empty-list<(float|int|string)>',
56105610
'range($integer, $mixed)',
56115611
],
56125612
[

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

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,12 @@ function doFoo(int $i, float $f, $floatOrInt): void {
1212
assertType('non-empty-list<float>', range(1, 9999, .01));
1313
assertType('non-empty-list<int<1, 9999>>', range(1, 9999, 3));
1414

15-
assertType('list<float|int>', range(1, 9999, $floatOrInt));
16-
assertType('list<float|int>', range(1, 9999, $floatOrInt));
15+
assertType('non-empty-list<float|int>', range(1, 9999, $floatOrInt));
1716

18-
assertType('list<int>', range(1, 3, $i));
19-
assertType('list<float|int>', range(1, 3, $f));
17+
assertType('non-empty-list<int>', range(1, 3, $i));
18+
assertType('non-empty-list<float|int>', range(1, 3, $f));
2019

21-
assertType('list<int>', range(1, 9999, $i));
22-
assertType('list<float|int>', range(1, 9999, $f));
20+
assertType('non-empty-list<int>', range(1, 9999, $i));
21+
assertType('non-empty-list<float|int>', range(1, 9999, $f));
2322
}
2423

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public function doFoo(
1717
assertType('array{\'a\', \'b\', \'c\', \'d\'}', range('a', 'd'));
1818
assertType('array{\'a\', \'c\', \'e\', \'g\', \'i\'}', range('a', 'i', 2));
1919

20-
assertType('list<string>', range($s, $s));
20+
assertType('non-empty-list<string>', range($s, $s));
2121
}
2222

2323
}

tests/PHPStan/Analyser/nsrt/range-int-range.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function zeroToMax(
1616
int $b
1717
): void
1818
{
19-
assertType('list<int<0, max>>', range($a, $b));
19+
assertType('non-empty-list<int<0, max>>', range($a, $b));
2020
}
2121

2222
/**
@@ -28,7 +28,7 @@ public function twoToTwenty(
2828
int $b
2929
): void
3030
{
31-
assertType('list<int<2, 20>>', range($a, $b));
31+
assertType('non-empty-list<int<2, 20>>', range($a, $b));
3232
}
3333

3434
/**
@@ -40,7 +40,7 @@ public function fifteenTo5(
4040
int $b
4141
): void
4242
{
43-
assertType('list<int<5, 30>>', range($a, $b));
43+
assertType('non-empty-list<int<5, 30>>', range($a, $b));
4444
}
4545

4646
public function knownRange(

tests/PHPStan/Analyser/nsrt/range-numeric-string.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function doFoo(
1616
string $b
1717
): void
1818
{
19-
assertType('list<float|int>', range($a, $b));
19+
assertType('non-empty-list<float|int>', range($a, $b));
2020
}
2121

2222
}

0 commit comments

Comments
 (0)