@@ -165,8 +165,6 @@ public function testItIsEmptyAfterReset()
165165 }
166166
167167 /**
168- * @requires extension openssl
169- *
170168 * @dataProvider provideCurlRequests
171169 */
172170 public function testItGeneratesCurlCommandsAsExpected (array $ request , string $ expectedCurlCommand )
@@ -342,9 +340,6 @@ public function __toString(): string
342340 }
343341 }
344342
345- /**
346- * @requires extension openssl
347- */
348343 public function testItDoesNotFollowRedirectionsWhenGeneratingCurlCommands ()
349344 {
350345 $ sut = new HttpClientDataCollector ();
@@ -372,9 +367,6 @@ public function testItDoesNotFollowRedirectionsWhenGeneratingCurlCommands()
372367 );
373368 }
374369
375- /**
376- * @requires extension openssl
377- */
378370 public function testItDoesNotGeneratesCurlCommandsForUnsupportedBodyType ()
379371 {
380372 $ sut = new HttpClientDataCollector ();
@@ -394,9 +386,6 @@ public function testItDoesNotGeneratesCurlCommandsForUnsupportedBodyType()
394386 self ::assertNull ($ curlCommand );
395387 }
396388
397- /**
398- * @requires extension openssl
399- */
400389 public function testItDoesGenerateCurlCommandsForBigData ()
401390 {
402391 $ sut = new HttpClientDataCollector ();
@@ -416,6 +405,25 @@ public function testItDoesGenerateCurlCommandsForBigData()
416405 self ::assertNotNull ($ curlCommand );
417406 }
418407
408+ public function testItDoesNotGeneratesCurlCommandsForUploadedFiles ()
409+ {
410+ $ sut = new HttpClientDataCollector ();
411+ $ sut ->registerClient ('http_client ' , $ this ->httpClientThatHasTracedRequests ([
412+ [
413+ 'method ' => 'POST ' ,
414+ 'url ' => 'http://localhost:8057/json ' ,
415+ 'options ' => [
416+ 'body ' => ['file ' => fopen ('data://text/plain, ' , 'r ' )],
417+ ],
418+ ],
419+ ]));
420+ $ sut ->lateCollect ();
421+ $ collectedData = $ sut ->getClients ();
422+ self ::assertCount (1 , $ collectedData ['http_client ' ]['traces ' ]);
423+ $ curlCommand = $ collectedData ['http_client ' ]['traces ' ][0 ]['curlCommand ' ];
424+ self ::assertNull ($ curlCommand );
425+ }
426+
419427 private function httpClientThatHasTracedRequests ($ tracedRequests ): TraceableHttpClient
420428 {
421429 $ httpClient = new TraceableHttpClient (new NativeHttpClient ());
0 commit comments