Skip to content

Commit 6609555

Browse files
committed
more tests
1 parent f9463c2 commit 6609555

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Diff for: tests/PHPStan/Type/TypeCombinatorTest.php

+14
Original file line numberDiff line numberDiff line change
@@ -971,6 +971,20 @@ public function dataUnion(): iterable
971971
IntersectionType::class,
972972
'non-empty-array&hasOffsetValue(\'foo\', mixed)',
973973
],
974+
[
975+
[
976+
new IntersectionType([
977+
new ArrayType(new MixedType(), new MixedType()),
978+
new HasOffsetType(new ConstantStringType('foo')),
979+
]),
980+
new IntersectionType([
981+
new ArrayType(new MixedType(), new MixedType()),
982+
new HasOffsetValueType(new ConstantIntegerType(2), new ConstantStringType('foo')),
983+
]),
984+
],
985+
IntersectionType::class,
986+
'non-empty-array',
987+
],
974988
[
975989
[
976990
new BenevolentUnionType([new IntegerType(), new StringType()]),

0 commit comments

Comments
 (0)