aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/util/error_handler_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 03:47:19 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 03:47:19 +0900
commit41c80058ad57143b2ab23d2eb241983627de9da1 (patch)
tree408cd7c8a4a853e744c8159e6743f7044edb3f20 /crates/shirabe/tests/util/error_handler_test.rs
parent0e92f06a6a6e327f83966e36c3d884eba12b4192 (diff)
downloadphp-shirabe-41c80058ad57143b2ab23d2eb241983627de9da1.tar.gz
php-shirabe-41c80058ad57143b2ab23d2eb241983627de9da1.tar.zst
php-shirabe-41c80058ad57143b2ab23d2eb241983627de9da1.zip
test: port Documentation/Xz/Audit/ErrorHandler/PharArchiver tests as stubs
All ignored/todo!(): they need infrastructure not yet ported (console Application, HttpDownloader/curl, ApplicationTester, PHP runtime error handler, PharData/ZipArchive). Wires up the downloader test target. setUp/tearDown not ported. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/util/error_handler_test.rs')
-rw-r--r--crates/shirabe/tests/util/error_handler_test.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/crates/shirabe/tests/util/error_handler_test.rs b/crates/shirabe/tests/util/error_handler_test.rs
index 3fecc60..92ce4e8 100644
--- a/crates/shirabe/tests/util/error_handler_test.rs
+++ b/crates/shirabe/tests/util/error_handler_test.rs
@@ -1 +1,24 @@
//! ref: composer/tests/Composer/Test/Util/ErrorHandlerTest.php
+
+// These tests rely on PHP's runtime error-handling machinery: ErrorHandler::register()
+// installs a handler that converts notices/warnings into \ErrorException, and the tests
+// trigger those by undefined-index access / array_merge misuse. There is no equivalent
+// runtime mechanism in Rust to port faithfully.
+
+#[test]
+#[ignore = "relies on PHP's set_error_handler converting an undefined-array-key notice into an ErrorException; no Rust equivalent"]
+fn test_error_handler_capture_notice() {
+ todo!()
+}
+
+#[test]
+#[ignore = "relies on PHP's runtime turning an invalid array_merge call into a TypeError/ErrorException; no Rust equivalent"]
+fn test_error_handler_capture_warning() {
+ todo!()
+}
+
+#[test]
+#[ignore = "relies on PHP's @ error-suppression operator and set_error_handler; no Rust equivalent"]
+fn test_error_handler_respects_at_operator() {
+ todo!()
+}