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
105105 $ this ->assertEquals ("GET " , $ this ->curlHandle ->getOption (CURLOPT_CUSTOMREQUEST ));
106106 }
107107
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
109112 {
110113 $ request = $ this ->requestFactory ->createRequest ("GET " , "https://example.com " )
111- ->withProtocolVersion (" 1.0 " );
114+ ->withProtocolVersion ($ versionString );
112115 $ this ->client ->sendRequest ($ request );
113116
114- $ this ->assertEquals (CURL_HTTP_VERSION_1_0 , $ this ->curlHandle ->getOption (CURLOPT_HTTP_VERSION ));
117+ $ this ->assertEquals ($ curlValue , $ this ->curlHandle ->getOption (CURLOPT_HTTP_VERSION ));
115118 }
116119
117120 public function testRemoveEncodingAndLengthHeaderForEncodedResponse (): void
You can’t perform that action at this time.
0 commit comments