Skip to content

Commit 4cef1da

Browse files
minor symfony#31184 [HttpFoundation] fix tests (nicolas-grekas)
This PR was merged into the 3.4 branch. Discussion ---------- [HttpFoundation] fix tests | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- 8e93ef3 [HttpFoundation] fix tests
2 parents e376c99 + 8e93ef3 commit 4cef1da

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

phpunit

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
// Cache-Id: https://github.com/symfony/symfony/commit/aad0c58
4+
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/32c5fa570117630dad45c21528b93d26bad02bc1
55

66
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
77
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";

src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -942,14 +942,15 @@ public function ianaCodesReasonPhrasesProvider()
942942

943943
$ianaHttpStatusCodes = new \DOMDocument();
944944

945-
libxml_set_streams_context(stream_context_create([
945+
$context = stream_context_create([
946946
'http' => [
947947
'method' => 'GET',
948948
'timeout' => 30,
949+
'user_agent' => __METHOD__,
949950
],
950-
]));
951+
]);
951952

952-
$ianaHttpStatusCodes->load('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml');
953+
$ianaHttpStatusCodes->loadXML(file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context));
953954
if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) {
954955
self::fail('Invalid IANA\'s HTTP status code list.');
955956
}

0 commit comments

Comments
 (0)