Skip to content

Commit 2f692c6

Browse files
committed
Update TypeCombinatorTest.php
1 parent 09f3526 commit 2f692c6

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tests/PHPStan/Type/TypeCombinatorTest.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4876,6 +4876,37 @@ public function dataRemove(): array
48764876
ObjectShapeType::class,
48774877
'object{foo?: int}',
48784878
],
4879+
[
4880+
new UnionType([
4881+
new ConstantArrayType([
4882+
new ConstantIntegerType(0),
4883+
], [
4884+
new MixedType(true),
4885+
],
4886+
[0], [], true
4887+
),
4888+
new ConstantArrayType([
4889+
new ConstantIntegerType(0),
4890+
new ConstantIntegerType(1),
4891+
new ConstantIntegerType(2),
4892+
], [
4893+
new MixedType(true),
4894+
new UnionType([new StringType(), new NullType()]),
4895+
new MixedType(true),
4896+
],
4897+
[0], [], true
4898+
),
4899+
]),
4900+
new ConstantArrayType([
4901+
new ConstantIntegerType(0),
4902+
], [
4903+
new MixedType(true),
4904+
],
4905+
[0], [], true
4906+
),
4907+
ConstantArrayType::class,
4908+
'array{mixed, string|null, mixed}',
4909+
],
48794910
];
48804911
}
48814912

0 commit comments

Comments
 (0)