@@ -165,8 +165,6 @@ public function testItIsEmptyAfterReset()
165
165
}
166
166
167
167
/**
168
- * @requires extension openssl
169
- *
170
168
* @dataProvider provideCurlRequests
171
169
*/
172
170
public function testItGeneratesCurlCommandsAsExpected (array $ request , string $ expectedCurlCommand )
@@ -342,9 +340,6 @@ public function __toString(): string
342
340
}
343
341
}
344
342
345
- /**
346
- * @requires extension openssl
347
- */
348
343
public function testItDoesNotFollowRedirectionsWhenGeneratingCurlCommands ()
349
344
{
350
345
$ sut = new HttpClientDataCollector ();
@@ -372,9 +367,6 @@ public function testItDoesNotFollowRedirectionsWhenGeneratingCurlCommands()
372
367
);
373
368
}
374
369
375
- /**
376
- * @requires extension openssl
377
- */
378
370
public function testItDoesNotGeneratesCurlCommandsForUnsupportedBodyType ()
379
371
{
380
372
$ sut = new HttpClientDataCollector ();
@@ -394,9 +386,6 @@ public function testItDoesNotGeneratesCurlCommandsForUnsupportedBodyType()
394
386
self ::assertNull ($ curlCommand );
395
387
}
396
388
397
- /**
398
- * @requires extension openssl
399
- */
400
389
public function testItDoesGenerateCurlCommandsForBigData ()
401
390
{
402
391
$ sut = new HttpClientDataCollector ();
@@ -416,6 +405,25 @@ public function testItDoesGenerateCurlCommandsForBigData()
416
405
self ::assertNotNull ($ curlCommand );
417
406
}
418
407
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
+
419
427
private function httpClientThatHasTracedRequests ($ tracedRequests ): TraceableHttpClient
420
428
{
421
429
$ httpClient = new TraceableHttpClient (new NativeHttpClient ());
0 commit comments