8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7ba3d8e commit cd01164Copy full SHA for cd01164
src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php
@@ -24,6 +24,11 @@ public static function setUpBeforeClass(): void
24
TestHttpServer::start();
25
}
26
27
+ public static function tearDownAfterClass(): void
28
+ {
29
+ TestHttpServer::stop();
30
+ }
31
+
32
public function testItCollectsRequestCount()
33
{
34
$httpClient1 = $this->httpClientThatHasTracedRequests([
src/Symfony/Component/HttpClient/Tests/HttplugClientTest.php
@@ -32,6 +32,11 @@ public static function setUpBeforeClass(): void
35
36
37
38
39
40
public function testSendRequest()
41
42
$client = new HttplugClient(new NativeHttpClient());
src/Symfony/Component/HttpClient/Tests/Psr18ClientTest.php
@@ -28,6 +28,11 @@ public static function setUpBeforeClass(): void
$factory = new Psr17Factory();
src/Symfony/Component/HttpClient/Tests/RetryableHttpClientTest.php
@@ -27,6 +27,11 @@
class RetryableHttpClientTest extends TestCase
public function testRetryOnError()
$client = new RetryableHttpClient(
src/Symfony/Component/HttpClient/Tests/TraceableHttpClientTest.php
@@ -29,6 +29,11 @@ public static function setUpBeforeClass(): void
public function testItTracesRequest()
$httpClient = $this->createMock(HttpClientInterface::class);
src/Symfony/Contracts/HttpClient/Test/HttpClientTestCase.php
+ TestHttpServer::stopAll();
abstract protected function getHttpClient(string $testCase): HttpClientInterface;
public function testGetRequest()
src/Symfony/Contracts/HttpClient/Test/TestHttpServer.php
@@ -43,4 +43,18 @@ public static function start(int $port = 8057)
43
44
return $process;
45
46
47
+ public static function stop(int $port = 8057)
48
49
+ if (isset(self::$process[$port])) {
50
+ self::$process[$port]->stop();
51
52
53
54
+ public static function stopAll()
55
56
+ foreach (self::$process as $process) {
57
+ $process->stop();
58
59
60