[PHP-CVS] [php-src] master: ext/curl: Test exception type in curl_read_function_error_on_int.phpt‎

[email protected] (NickSdot via GitHub)
Newsgroups php.cvs
Message-ID <[email protected]>
Author: NickSdot (NickSdot)
Committer: GitHub (web-flow)
Pusher: LamentXU123
Date: 2026-08-14T01:10:32+08:00

Commit: https://github.com/php/php-src/commit/a8d0fb4229122001de78c0e095b20360acfad19a
Raw diff: https://github.com/php/php-src/commit/a8d0fb4229122001de78c0e095b20360acfad19a.diff

ext/curl: Test exception type in curl_read_function_error_on_int.phpt‎

Follow up to #22757

Changed paths:
  M  ext/curl/tests/curl_read_function_error_on_int.phpt


Diff:

diff --git a/ext/curl/tests/curl_read_function_error_on_int.phpt b/ext/curl/tests/curl_read_function_error_on_int.phpt
index 30ba97737727..0b4d86e07b43 100644
--- a/ext/curl/tests/curl_read_function_error_on_int.phpt
+++ b/ext/curl/tests/curl_read_function_error_on_int.phpt
@@ -21,10 +21,10 @@ curl_setopt($ch, CURLOPT_READFUNCTION, "custom_readfunction" );
 try {
     curl_exec($ch);
 } catch (ValueError $e) {
-    echo $e->getMessage() . "\n";
+    echo $e::class, ': ', $e->getMessage(), "\n";
 }
 var_dump(curl_error($ch));
 ?>
 --EXPECT--
-The CURLOPT_READFUNCTION callback must return a string or CURL_READFUNC_ABORT or CURL_READFUNC_PAUSE
+ValueError: The CURLOPT_READFUNCTION callback must return a string or CURL_READFUNC_ABORT or CURL_READFUNC_PAUSE
 string(29) "operation aborted by callback"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.