diff --git a/tests/PHPStan/Type/TypeCombinatorTest.php b/tests/PHPStan/Type/TypeCombinatorTest.php index 84e3c7f3976..31e3c8f03a8 100644 --- a/tests/PHPStan/Type/TypeCombinatorTest.php +++ b/tests/PHPStan/Type/TypeCombinatorTest.php @@ -894,6 +894,14 @@ public function dataUnion(): iterable UnionType::class, '(1|2)|string', ], + [ + [ + new BenevolentUnionType([new ConstantStringType('1'), new ConstantStringType('2')]), + new StringType(), + ], + StringType::class, + 'string', + ], [ [ new BenevolentUnionType([new ConstantIntegerType(1), new ConstantIntegerType(2), new ConstantIntegerType(3)]),