@@ -1215,6 +1215,8 @@ public function testForceResolveIPUnknown(): void
12151215
12161216 /**
12171217 * @return array<string, array<string, bool|int|string>>
1218+ *
1219+ * @see https://linux.die.net/man/3/curl_easy_setopt
12181220 */
12191221 public static function provideDNSCacheTimeout (): iterable
12201222 {
@@ -1227,7 +1229,17 @@ public static function provideDNSCacheTimeout(): iterable
12271229 'valid timeout (numeric string) ' => [
12281230 'input ' => '180 ' ,
12291231 'expectedHasKey ' => true ,
1230- 'expectedValue ' => '180 ' ,
1232+ 'expectedValue ' => 180 ,
1233+ ],
1234+ 'valid timeout (zero / disabled) ' => [
1235+ 'input ' => 0 ,
1236+ 'expectedHasKey ' => true ,
1237+ 'expectedValue ' => 0 ,
1238+ ],
1239+ 'valid timeout (forever) ' => [
1240+ 'input ' => -1 ,
1241+ 'expectedHasKey ' => true ,
1242+ 'expectedValue ' => -1 ,
12311243 ],
12321244 'invalid timeout (null) ' => [
12331245 'input ' => null ,
@@ -1237,11 +1249,7 @@ public static function provideDNSCacheTimeout(): iterable
12371249 'input ' => 'is_wrong ' ,
12381250 'expectedHasKey ' => false ,
12391251 ],
1240- 'invalid timeout (zero) ' => [
1241- 'input ' => 0 ,
1242- 'expectedHasKey ' => false ,
1243- ],
1244- 'invalid timeout (negative number) ' => [
1252+ 'invalid timeout (negative number / below -1) ' => [
12451253 'input ' => -2 ,
12461254 'expectedHasKey ' => false ,
12471255 ],
0 commit comments