File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -105,13 +105,16 @@ public function testEmptyReasonPhrase(): void
105
105
$ this ->assertEquals ("GET " , $ this ->curlHandle ->getOption (CURLOPT_CUSTOMREQUEST ));
106
106
}
107
107
108
- public function testForceHttp10 (): void
108
+ #[TestWith(["1.0 " , CURL_HTTP_VERSION_1_0 ])]
109
+ #[TestWith(["1.1 " , CURL_HTTP_VERSION_1_1 ])]
110
+ #[TestWith(["2.0 " , CURL_HTTP_VERSION_2_0 ])]
111
+ public function testHttpProtocolVersions (string $ versionString , int $ curlValue ): void
109
112
{
110
113
$ request = $ this ->requestFactory ->createRequest ("GET " , "https://example.com " )
111
- ->withProtocolVersion (" 1.0 " );
114
+ ->withProtocolVersion ($ versionString );
112
115
$ this ->client ->sendRequest ($ request );
113
116
114
- $ this ->assertEquals (CURL_HTTP_VERSION_1_0 , $ this ->curlHandle ->getOption (CURLOPT_HTTP_VERSION ));
117
+ $ this ->assertEquals ($ curlValue , $ this ->curlHandle ->getOption (CURLOPT_HTTP_VERSION ));
115
118
}
116
119
117
120
public function testRemoveEncodingAndLengthHeaderForEncodedResponse (): void
You can’t perform that action at this time.
0 commit comments