blob: 8f42bcabff586a13a886dbc3847aec9c0d8759b4 (
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();
}
}
#[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!()
}
|