Skip to content

Commit 437a4d3

Browse files
Merge branch '5.0' into 5.1
* 5.0: Fix abstract method name in PHP doc block Various cleanups [HttpClient] fix issues in tests Fixes sprintf(): Too few arguments in form transformer [Console] Fix QuestionHelper::disableStty() [Validator] Use Mime component to determine mime type for file validator validate subforms in all validation groups Update Hungarian translations Add meaningful message when Process is not installed (ProcessHelper) [PropertyAccess] Fix TypeError parsing again. [TwigBridge] fix fallback html-to-txt body converter [Security/Http] fix merge [ErrorHandler] fix setting $trace to null in FatalError [Form] add missing Czech validators translation [Validator] add missing Czech translations never directly validate Existence (Required/Optional) constraints
2 parents 456d3e0 + 889983d commit 437a4d3

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

Tests/DataCollector/HttpClientDataCollectorTest.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* file that was distributed with this source code.
1010
*/
1111

12+
namespace Symfony\Component\HttpClient\Tests\DataCollector;
13+
1214
use PHPUnit\Framework\TestCase;
1315
use Symfony\Component\HttpClient\DataCollector\HttpClientDataCollector;
1416
use Symfony\Component\HttpClient\NativeHttpClient;
@@ -19,9 +21,13 @@
1921

2022
class HttpClientDataCollectorTest extends TestCase
2123
{
22-
public function testItCollectsRequestCount()
24+
public static function setUpBeforeClass(): void
2325
{
2426
TestHttpServer::start();
27+
}
28+
29+
public function testItCollectsRequestCount()
30+
{
2531
$httpClient1 = $this->httpClientThatHasTracedRequests([
2632
[
2733
'method' => 'GET',
@@ -50,7 +56,6 @@ public function testItCollectsRequestCount()
5056

5157
public function testItCollectsErrorCount()
5258
{
53-
TestHttpServer::start();
5459
$httpClient1 = $this->httpClientThatHasTracedRequests([
5560
[
5661
'method' => 'GET',
@@ -80,7 +85,6 @@ public function testItCollectsErrorCount()
8085

8186
public function testItCollectsErrorCountByClient()
8287
{
83-
TestHttpServer::start();
8488
$httpClient1 = $this->httpClientThatHasTracedRequests([
8589
[
8690
'method' => 'GET',
@@ -113,7 +117,6 @@ public function testItCollectsErrorCountByClient()
113117

114118
public function testItCollectsTracesByClient()
115119
{
116-
TestHttpServer::start();
117120
$httpClient1 = $this->httpClientThatHasTracedRequests([
118121
[
119122
'method' => 'GET',
@@ -146,7 +149,6 @@ public function testItCollectsTracesByClient()
146149

147150
public function testItIsEmptyAfterReset()
148151
{
149-
TestHttpServer::start();
150152
$httpClient1 = $this->httpClientThatHasTracedRequests([
151153
[
152154
'method' => 'GET',

Tests/HttplugClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222

2323
class HttplugClientTest extends TestCase
2424
{
25-
private static $server;
26-
2725
public static function setUpBeforeClass(): void
2826
{
2927
TestHttpServer::start();

Tests/Psr18ClientTest.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
class Psr18ClientTest extends TestCase
2323
{
24-
private static $server;
25-
2624
public static function setUpBeforeClass(): void
2725
{
2826
TestHttpServer::start();

Tests/TraceableHttpClientTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@
2121

2222
class TraceableHttpClientTest extends TestCase
2323
{
24+
public static function setUpBeforeClass(): void
25+
{
26+
TestHttpServer::start();
27+
}
28+
2429
public function testItTracesRequest()
2530
{
2631
$httpClient = $this->getMockBuilder(HttpClientInterface::class)->getMock();
@@ -85,8 +90,6 @@ public function testItResetsTraces()
8590

8691
public function testStream()
8792
{
88-
TestHttpServer::start();
89-
9093
$sut = new TraceableHttpClient(new NativeHttpClient());
9194
$response = $sut->request('GET', 'http://localhost:8057/chunked');
9295
$chunks = [];

0 commit comments

Comments
 (0)