diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-18 10:25:38 +0100 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-03-18 11:46:27 +0100 |
commit | ba6834fa574495d0f31be10b74bd7cfd4ef054e5 (patch) | |
tree | f11e245265403b610820ad922459cd56872316ad | |
parent | bf382a3cb600541b199f48b16c98b2b1c58bf5e8 (diff) | |
download | php-git-ba6834fa574495d0f31be10b74bd7cfd4ef054e5.tar.gz |
Make bug52820.phpt more robust
Use a more robust error condition...
-rw-r--r-- | ext/standard/tests/file/bug52820.phpt | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/standard/tests/file/bug52820.phpt b/ext/standard/tests/file/bug52820.phpt index e51c27e457..cdf4db3e5a 100644 --- a/ext/standard/tests/file/bug52820.phpt +++ b/ext/standard/tests/file/bug52820.phpt @@ -7,7 +7,7 @@ if (!function_exists('zend_leak_variable')) /* unfortunately no standard function does a cast to FILE*, so we need * curl to test this */ if (!extension_loaded("curl")) exit("skip curl extension not loaded"); -$handle=curl_init('http://127.0.0.1:37349/'); +$handle=curl_init('file:///i_dont_exist/'); curl_setopt($handle, CURLOPT_VERBOSE, true); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+"))) @@ -15,7 +15,7 @@ if (!curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+"))) --FILE-- <?php function do_stuff($url) { - $handle=curl_init('http://127.0.0.1:37349/'); + $handle=curl_init('file:///i_dont_exist/'); curl_setopt($handle, CURLOPT_VERBOSE, true); curl_setopt($handle, CURLOPT_RETURNTRANSFER, true); curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+")); @@ -42,22 +42,22 @@ echo "\nDone.\n"; --EXPECTF-- temp stream (close after): About to rewind! -* %ATrying 127.0.0.1...%AConnection refused%A +* Couldn't open file /i_dont_exist/ * Closing connection%A%d memory stream (close after): About to rewind! -* %ATrying 127.0.0.1...%AConnection refused%A +* Couldn't open file /i_dont_exist/ * Closing connection%A%d temp stream (leak): About to rewind! -* %ATrying 127.0.0.1...%AConnection refused%A +* Couldn't open file /i_dont_exist/ * Closing connection%A%d memory stream (leak): About to rewind! -* %ATrying 127.0.0.1...%AConnection refused%A +* Couldn't open file /i_dont_exist/ * Closing connection%A%d Done. |