Skip to content

Commit 9762421

Browse files
committed
Fix test
1 parent ebde206 commit 9762421

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

ext/standard/tests/streams/stream_context_create_error.phpt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22
Test the error cases of stream_context_create()
33
--FILE--
44
<?php
5-
$arr = [];
65
try {
7-
stream_context_create($arr);
6+
stream_context_create(['ssl' => "abc"]);
87
} catch (ValueError $exception) {
98
echo $exception->getMessage() . "\n";
109
}
1110

1211
try {
13-
stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => $arr]);
12+
stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => ['ssl' => "abc"]]);
1413
} catch (ValueError $exception) {
1514
echo $exception->getMessage() . "\n";
1615
}
1716

1817
try {
1918
stream_context_create(['ssl' => ['verify_peer'=> false]], ["options" => false]);
20-
} catch (ValueError $exception) {
19+
} catch (TypeError $exception) {
2120
echo $exception->getMessage() . "\n";
2221
}
2322
?>

0 commit comments

Comments
 (0)