Skip to content

Commit 6851172

Browse files
committed
Update test assertions
1 parent e2c6207 commit 6851172

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"keywords": ["static analysis"],
99
"require": {
1010
"php": "^7.4 || ^8.0",
11-
"phpstan/phpstan": "^2.1.41"
11+
"phpstan/phpstan": "^2.1.48"
1212
},
1313
"conflict": {
1414
"phpunit/phpunit": "<7.0"

tests/Rules/PHPUnit/DataProviderDataRuleTest.php

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function testRule(): void
9999
182,
100100
],
101101
[
102-
'Parameter #2 $input of method DataProviderDataTest\UnionTypeReturnTest::testFoo() expects string, int given.',
102+
'Parameter #2 $input of method DataProviderDataTest\UnionTypeReturnTest::testFoo() expects string, int|string given.',
103103
216,
104104
],
105105
[
@@ -159,15 +159,15 @@ public function testRule(): void
159159
411,
160160
],
161161
[
162-
'Parameter #2 $input of method DataProviderDataTest\ConstantArrayUnionTypeReturnTest::testFoo() expects string, int given.',
162+
'Parameter #2 $input of method DataProviderDataTest\ConstantArrayUnionTypeReturnTest::testFoo() expects string, int|string given.',
163163
446,
164164
],
165165
[
166166
'Method DataProviderDataTest\ConstantArrayDifferentLengthUnionTypeReturnTest::testFoo() invoked with 3 parameters, 2 required.',
167167
484,
168168
],
169169
[
170-
'Parameter #2 $input of method DataProviderDataTest\ConstantArrayDifferentLengthUnionTypeReturnTest::testFoo() expects string, int given.',
170+
'Parameter #2 $input of method DataProviderDataTest\ConstantArrayDifferentLengthUnionTypeReturnTest::testFoo() expects string, int|string given.',
171171
484,
172172
],
173173
[
@@ -193,11 +193,7 @@ public function testRulePhp8(?int $phpunitVersion): void
193193
if ($phpunitVersion >= 11) {
194194
$errors = [
195195
[
196-
'Parameter $input of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, int given.',
197-
44
198-
],
199-
[
200-
'Parameter $input of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, false given.',
196+
'Parameter $input of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, int|string|false given.',
201197
44
202198
],
203199
[
@@ -216,11 +212,7 @@ public function testRulePhp8(?int $phpunitVersion): void
216212
} else {
217213
$errors = [
218214
[
219-
'Parameter #1 $expectedResult of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, int given.',
220-
44
221-
],
222-
[
223-
'Parameter #1 $expectedResult of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, false given.',
215+
'Parameter #1 $expectedResult of method DataProviderDataTestPhp8\NamedArgsInProvider::testFoo() expects string, int|string|false given.',
224216
44
225217
],
226218
[

0 commit comments

Comments
 (0)