[php-src] master: ext/intl: applied fixers to improve test robustness (#23021)

NickSdot via GitHub <[email protected]>
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: NickSdot (NickSdot)
Committer: GitHub (web-flow)
Pusher: LamentXU123
Date: 2026-08-04T22:39:43+08:00

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

ext/intl: applied fixers to improve test robustness (#23021)

Asserts actual error class; extracted from: #22799

Changed paths:
  M  ext/intl/tests/spoofchecker_ubidi.phpt


Diff:

diff --git a/ext/intl/tests/spoofchecker_ubidi.phpt b/ext/intl/tests/spoofchecker_ubidi.phpt
index 6e1f7b35fc64..c753592287be 100644
--- a/ext/intl/tests/spoofchecker_ubidi.phpt
+++ b/ext/intl/tests/spoofchecker_ubidi.phpt
@@ -11,7 +11,7 @@ $s = new Spoofchecker();
 try {
     $s->areBidiConfusable(Spoofchecker::RTL + 1, "a", "a");
 } catch (ValueError $e) {
-    echo $e->getMessage() . PHP_EOL;
+    echo $e::class, ': ', $e->getMessage(), PHP_EOL;
 }
 
 /* "A1<aleph>" and "A<aleph>1" both display as "A1<aleph>" in a left to right
@@ -39,7 +39,7 @@ var_dump($s->areBidiConfusable(Spoofchecker::LTR, "Mark_", "_Mark", $errorCode))
 var_dump($errorCode);
 ?>
 --EXPECT--
-Spoofchecker::areBidiConfusable(): Argument #1 ($direction) must be either Spoofchecker::LTR or Spoofchecker::RTL
+ValueError: Spoofchecker::areBidiConfusable(): Argument #1 ($direction) must be either Spoofchecker::LTR or Spoofchecker::RTL
 bool(true)
 bool(false)
 bool(false)
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.