@@ -1044,4 +1044,30 @@ public function testValuesArray(ConstantArrayType $type, ConstantArrayType $expe
10441044 $ this ->assertSame ($ expectedType ->getNextAutoIndexes (), $ actualType ->getNextAutoIndexes ());
10451045 }
10461046
1047+ public static function dataHasOffsetValueType (): array
1048+ {
1049+ return [
1050+ [
1051+ new ConstantArrayType ([new ConstantIntegerType (0 )], [new ConstantStringType ('a ' )]),
1052+ new ConstantArrayType ([new ConstantIntegerType (0 )], [new ConstantStringType ('a ' )]),
1053+ TrinaryLogic::createNo (),
1054+ ],
1055+ ];
1056+ }
1057+ 1058+ #[DataProvider('dataHasOffsetValueType ' )]
1059+ public function testHasOffsetValueType (
1060+ ConstantArrayType $ type ,
1061+ Type $ offsetType ,
1062+ TrinaryLogic $ expectedResult ,
1063+ ): void
1064+ {
1065+ $ actualResult = $ type ->hasOffsetValueType ($ offsetType );
1066+ $ this ->assertSame (
1067+ $ expectedResult ->describe (),
1068+ $ actualResult ->describe (),
1069+ sprintf ('%s -> hasOffsetValueType(%s) ' , $ type ->describe (VerbosityLevel::precise ()), $ offsetType ->describe (VerbosityLevel::precise ())),
1070+ );
1071+ }
1072+ 10471073}
0 commit comments