diff options
Diffstat (limited to 'crates/shirabe/tests/event_dispatcher')
| -rw-r--r-- | crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs index af8a33db..817a6954 100644 --- a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs +++ b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs @@ -27,6 +27,7 @@ use shirabe::util::platform::Platform; use shirabe::util::process_executor::{MockHandler, ProcessExecutor}; use shirabe_class_map_generator::class_map::ClassMap; use shirabe_external_packages::symfony::console::output::output_interface; +use shirabe_php_shim::Catch as _; use shirabe_php_shim::{PHP_EOL, PhpMixed}; fn tear_down() { @@ -286,8 +287,7 @@ fn test_dispatcher_detect_infinite_recursion() { let result = dispatcher.dispatch(Some("root"), Some(&mut event)); let err = result.expect_err("infinite recursion must raise a RuntimeException"); assert!( - err.downcast_ref::<shirabe_php_shim::RuntimeException>() - .is_some(), + err.is_instanceof::<shirabe_php_shim::RuntimeException>(), "expected RuntimeException, got: {err:?}" ); } @@ -392,8 +392,7 @@ fn test_listener_exceptions_are_caught() { let e = result.expect_err("expected RuntimeException"); assert!( - e.downcast_ref::<shirabe_php_shim::RuntimeException>() - .is_some(), + e.is_instanceof::<shirabe_php_shim::RuntimeException>(), "got: {e:?}" ); } |
