Skip to content
Permalink
Browse files

[HttpFoundation] fix tests

  • Loading branch information...
nicolas-grekas committed Apr 19, 2019
1 parent e376c99 commit 8e93ef3d01b49873aabc35d878271354bb518ae1
Showing with 5 additions and 4 deletions.
  1. +1 −1 phpunit
  2. +4 −3 src/Symfony/Component/HttpFoundation/Tests/ResponseTest.php
@@ -1,7 +1,7 @@
#!/usr/bin/env php
<?php
// Cache-Id: https://github.com/symfony/symfony/commit/aad0c58
// Cache-Id: https://github.com/symfony/phpunit-bridge/commit/32c5fa570117630dad45c21528b93d26bad02bc1
if (!file_exists(__DIR__.'/vendor/symfony/phpunit-bridge/bin/simple-phpunit')) {
echo "Unable to find the `simple-phpunit` script in `vendor/symfony/phpunit-bridge/bin/`.\nPlease run `composer update` before running this command.\n";
@@ -942,14 +942,15 @@ public function ianaCodesReasonPhrasesProvider()
$ianaHttpStatusCodes = new \DOMDocument();
libxml_set_streams_context(stream_context_create([
$context = stream_context_create([
'http' => [
'method' => 'GET',
'timeout' => 30,
'user_agent' => __METHOD__,
],
]));
]);
$ianaHttpStatusCodes->load('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml');
$ianaHttpStatusCodes->loadXML(file_get_contents('https://www.iana.org/assignments/http-status-codes/http-status-codes.xml', false, $context));
if (!$ianaHttpStatusCodes->relaxNGValidate(__DIR__.'/schema/http-status-codes.rng')) {
self::fail('Invalid IANA\'s HTTP status code list.');
}

0 comments on commit 8e93ef3

Please sign in to comment.
You can’t perform that action at this time.