Skip to content

Commit 3b66d33

Browse files
committed
Update TypeCombinatorTest.php
1 parent 42c5280 commit 3b66d33

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
@@ -4861,6 +4861,37 @@ public function dataRemove(): array
48614861
ObjectShapeType::class,
48624862
'object{foo?: int}',
48634863
],
4864+
[
4865+
new UnionType([
4866+
new ConstantArrayType([
4867+
new ConstantIntegerType(0),
4868+
], [
4869+
new MixedType(true),
4870+
],
4871+
[0], [], true
4872+
),
4873+
new ConstantArrayType([
4874+
new ConstantIntegerType(0),
4875+
new ConstantIntegerType(1),
4876+
new ConstantIntegerType(2),
4877+
], [
4878+
new MixedType(true),
4879+
new UnionType([new StringType(), new NullType()]),
4880+
new MixedType(true),
4881+
],
4882+
[0], [], true
4883+
),
4884+
]),
4885+
new ConstantArrayType([
4886+
new ConstantIntegerType(0),
4887+
], [
4888+
new MixedType(true),
4889+
],
4890+
[0], [], true
4891+
),
4892+
ConstantArrayType::class,
4893+
'array{mixed, string|null, mixed}',
4894+
],
48644895
];
48654896
}
48664897

0 commit comments

Comments
 (0)