Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 791ee7d

Browse filesBrowse files
committed
minor #45698 [HttpClient] fix tests on Windows (xabbuh)
This PR was merged into the 6.1 branch. Discussion ---------- [HttpClient] fix tests on Windows | Q | A | ------------- | --- | Branch? | 6.1 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- d623824 fix tests on Windows
2 parents cd62c2d + d623824 commit 791ee7d
Copy full SHA for 791ee7d

File tree

Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+10
-10
lines changed

‎src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/HttpClient/Tests/DataCollector/HttpClientDataCollectorTest.php
+10-10Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -182,13 +182,13 @@ public function testItGeneratesCurlCommandsAsExpected()
182182
$collectedData = $sut->getClients();
183183
self::assertCount(1, $collectedData['http_client']['traces']);
184184
$curlCommand = $collectedData['http_client']['traces'][0]['curlCommand'];
185-
self::assertEquals("curl \\
185+
self::assertEquals(sprintf('curl \\
186186
--compressed \\
187187
--request GET \\
188-
--url 'https://symfony.com/releases.json' \\
189-
--header 'Accept: */*' \\
190-
--header 'Accept-Encoding: gzip' \\
191-
--header 'User-Agent: Symfony HttpClient/Native'", $curlCommand
188+
--url %1$shttps://symfony.com/releases.json%1$s \\
189+
--header %1$sAccept: */*%1$s \\
190+
--header %1$sAccept-Encoding: gzip%1$s \\
191+
--header %1$sUser-Agent: Symfony HttpClient/Native%1$s', '\\' === \DIRECTORY_SEPARATOR ? '"' : "'"), $curlCommand
192192
);
193193
}
194194

@@ -208,13 +208,13 @@ public function testItDoesNotFollowRedirectionsWhenGeneratingCurlCommands()
208208
$collectedData = $sut->getClients();
209209
self::assertCount(1, $collectedData['http_client']['traces']);
210210
$curlCommand = $collectedData['http_client']['traces'][0]['curlCommand'];
211-
self::assertEquals("curl \\
211+
self::assertEquals(sprintf('curl \\
212212
--compressed \\
213213
--request GET \\
214-
--url 'http://symfony.com/releases.json' \\
215-
--header 'Accept: */*' \\
216-
--header 'Accept-Encoding: gzip' \\
217-
--header 'User-Agent: Symfony HttpClient/Native'", $curlCommand
214+
--url %1$shttp://symfony.com/releases.json%1$s \\
215+
--header %1$sAccept: */*%1$s \\
216+
--header %1$sAccept-Encoding: gzip%1$s \\
217+
--header %1$sUser-Agent: Symfony HttpClient/Native%1$s', '\\' === \DIRECTORY_SEPARATOR ? '"' : "'"), $curlCommand
218218
);
219219
}
220220

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.