Skip to content

Commit 6290900

Browse files
committed
[skip ci] Fix uri parser test https when openssl is not available
1 parent ae3b81d commit 6290900

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/standard/tests/file/file_get_contents_with_custom_uri_parser.phpt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ try {
99
"uri_parser_class" => "not-exists",
1010
],
1111
]);
12-
var_dump(file_get_contents("https://example.com", context: $context));
12+
var_dump(file_get_contents("http://example.com", context: $context));
1313
} catch (Error $e) {
1414
echo $e->getMessage() . "\n";
1515
}
@@ -19,31 +19,31 @@ $context = stream_context_create([
1919
"uri_parser_class" => null,
2020
],
2121
]);
22-
var_dump(file_get_contents("https:///example.com", context: $context)); // invalid for parse_url only, valid for the other handlers
22+
var_dump(file_get_contents("http:///example.com", context: $context)); // invalid for parse_url only, valid for the other handlers
2323

2424
$context = stream_context_create([
2525
"http" => [
2626
"uri_parser_class" => \Uri\Rfc3986\Uri::class,
2727
],
2828
]);
29-
var_dump(file_get_contents("https://éxamplé.com", context: $context)); // invalid for RFC 3986 only, valid for the other handlers
29+
var_dump(file_get_contents("http://éxamplé.com", context: $context)); // invalid for RFC 3986 only, valid for the other handlers
3030

3131
$context = stream_context_create([
3232
"http" => [
3333
"uri_parser_class" => \Uri\WhatWg\Url::class,
3434
],
3535
]);
36-
var_dump(file_get_contents("https://exa%23mple.org", context: $context)); // invalid for WHATWG only, valid for the other handlers
36+
var_dump(file_get_contents("http://exa%23mple.org", context: $context)); // invalid for WHATWG only, valid for the other handlers
3737

3838
?>
3939
--EXPECTF--
4040
file_get_contents(): Provided stream context has invalid value for the "uri_parser_class" option
4141

42-
Warning: file_get_contents(https:///example.com): Failed to open stream: operation failed in %s on line %d
42+
Warning: file_get_contents(http:///example.com): Failed to open stream: operation failed in %s on line %d
4343
bool(false)
4444

45-
Warning: file_get_contents(https://éxamplé.com): Failed to open stream: operation failed in %s on line %d
45+
Warning: file_get_contents(http://éxamplé.com): Failed to open stream: operation failed in %s on line %d
4646
bool(false)
4747

48-
Warning: file_get_contents(https://exa%23mple.org): Failed to open stream: operation failed in %s on line %d
48+
Warning: file_get_contents(http://exa%23mple.org): Failed to open stream: operation failed in %s on line %d
4949
bool(false)

0 commit comments

Comments
 (0)