|
9 | 9 | * file that was distributed with this source code. |
10 | 10 | */ |
11 | 11 |
|
| 12 | +namespace Symfony\Component\HttpClient\Tests\DataCollector; |
| 13 | + |
12 | 14 | use PHPUnit\Framework\TestCase; |
13 | 15 | use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector; |
14 | 16 | use Symfony\Component\HttpClient\NativeHttpClient; |
|
19 | 21 |
|
20 | 22 | class HttpClientDataCollectorTest extends TestCase |
21 | 23 | { |
22 | | - public function testItCollectsRequestCount() |
| 24 | + public static function setUpBeforeClass(): void |
23 | 25 | { |
24 | 26 | TestHttpServer::start(); |
| 27 | + } |
| 28 | + |
| 29 | + public function testItCollectsRequestCount() |
| 30 | + { |
25 | 31 | $httpClient1 = $this->httpClientThatHasTracedRequests([ |
26 | 32 | [ |
27 | 33 | 'method' => 'GET', |
@@ -50,7 +56,6 @@ public function testItCollectsRequestCount() |
50 | 56 |
|
51 | 57 | public function testItCollectsErrorCount() |
52 | 58 | { |
53 | | - TestHttpServer::start(); |
54 | 59 | $httpClient1 = $this->httpClientThatHasTracedRequests([ |
55 | 60 | [ |
56 | 61 | 'method' => 'GET', |
@@ -80,7 +85,6 @@ public function testItCollectsErrorCount() |
80 | 85 |
|
81 | 86 | public function testItCollectsErrorCountByClient() |
82 | 87 | { |
83 | | - TestHttpServer::start(); |
84 | 88 | $httpClient1 = $this->httpClientThatHasTracedRequests([ |
85 | 89 | [ |
86 | 90 | 'method' => 'GET', |
@@ -113,7 +117,6 @@ public function testItCollectsErrorCountByClient() |
113 | 117 |
|
114 | 118 | public function testItCollectsTracesByClient() |
115 | 119 | { |
116 | | - TestHttpServer::start(); |
117 | 120 | $httpClient1 = $this->httpClientThatHasTracedRequests([ |
118 | 121 | [ |
119 | 122 | 'method' => 'GET', |
@@ -146,7 +149,6 @@ public function testItCollectsTracesByClient() |
146 | 149 |
|
147 | 150 | public function testItIsEmptyAfterReset() |
148 | 151 | { |
149 | | - TestHttpServer::start(); |
150 | 152 | $httpClient1 = $this->httpClientThatHasTracedRequests([ |
151 | 153 | [ |
152 | 154 | 'method' => 'GET', |
|
0 commit comments