Skip to content

Commit 2377fc7

Browse files
committed
minor symfony#54504 [HttpClient] fix syntax for PHP 7.2 (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [HttpClient] fix syntax for PHP 7.2 | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | | License | MIT Commits ------- d5094eb fix syntax for PHP 7.2
2 parents 32e57aa + d5094eb commit 2377fc7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/Symfony/Component/HttpClient/Tests/EventSourceHttpClientTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class EventSourceHttpClientTest extends TestCase
3434
*/
3535
public function testGetServerSentEvents(string $sep)
3636
{
37-
$data = str_replace("\n", $sep, <<<TXT
37+
$rawData = <<<TXT
3838
event: builderror
3939
id: 46
4040
data: {"foo": "bar"}
@@ -62,7 +62,8 @@ public function testGetServerSentEvents(string $sep)
6262
6363
id: 60
6464
data
65-
TXT);
65+
TXT;
66+
$data = str_replace("\n", $sep, $rawData);
6667

6768
$chunk = new DataChunk(0, $data);
6869
$response = new MockResponse('', ['canceled' => false, 'http_method' => 'GET', 'url' => 'http://localhost:8080/events', 'response_headers' => ['content-type: text/event-stream']]);

0 commit comments

Comments
 (0)