blob: 7295cf2aa091b8f56ce6812b07a7084e8a293c04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
//! 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.
#[allow(dead_code)]
fn set_up() {
// ErrorHandler::register() installs a PHP set_error_handler; no Rust equivalent.
todo!()
}
#[allow(dead_code)]
fn tear_down() {
// restore_error_handler() is PHP runtime machinery; no Rust equivalent.
todo!()
}
#[allow(dead_code)]
struct TearDown;
impl Drop for TearDown {
fn drop(&mut self) {
tear_down();
}
}
#[ignore = "depends on PHP runtime routing an undefined-index notice through set_error_handler; no Rust equivalent for $array['baz'] triggering ErrorHandler::handle"]
#[test]
fn test_error_handler_capture_notice() {
todo!()
}
#[ignore = "depends on PHP runtime emitting a TypeError/warning from array_merge([], 'string') via set_error_handler; no Rust equivalent"]
#[test]
fn test_error_handler_capture_warning() {
todo!()
}
#[ignore = "depends on the PHP @ error-suppression operator and trigger_error routing through set_error_handler; no Rust equivalent"]
#[test]
fn test_error_handler_respects_at_operator() {
todo!()
}
|