From 494f79d0caf614325408d82d5c7a58f9e4396590 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 16 Aug 2026 16:26:21 +0900 Subject: test: correct stale #[ignore] reasons Running the ignored tests shows several reasons naming a blocker the test never reaches. The plugin hooks in all_functional_test do run, and what stops both cases is the worker's Composer\InstalledVersions; class_loader_test stops at include_file, not class_exists; auth_helper_test's wrapper is ported and the blocker is trigger_error; composerRequire is ported as __shirabe_composer_require. Co-Authored-By: Claude Opus 5 (1M context) --- crates/shirabe/tests/all_functional_test.rs | 4 ++-- .../shirabe/tests/autoload/autoload_generator_test.rs | 2 +- crates/shirabe/tests/autoload/class_loader_test.rs | 2 +- crates/shirabe/tests/util/auth_helper_test.rs | 17 +++++++++-------- 4 files changed, 13 insertions(+), 12 deletions(-) (limited to 'crates/shirabe/tests') diff --git a/crates/shirabe/tests/all_functional_test.rs b/crates/shirabe/tests/all_functional_test.rs index f9059927..9ca09dc4 100644 --- a/crates/shirabe/tests/all_functional_test.rs +++ b/crates/shirabe/tests/all_functional_test.rs @@ -265,14 +265,14 @@ fn test_integration_create_project_shows_full_hash_for_dev_packages() { #[test] #[serial] -#[ignore = "requires the Plugin API (PHP plugin Hooks emitting !! markers), which is not yet implemented"] +#[ignore = "the fixture's Hooks read Composer\\InstalledVersions, which is not autoloadable in the plugin worker (the fixture ships no vendor/ directory), so the pre-update hook aborts with `Class \"Composer\\InstalledVersions\" not found`"] fn test_integration_installed_versions() { run_integration("installed-versions.test"); } #[test] #[serial] -#[ignore = "requires the Plugin API (PHP plugin Hooks emitting !! markers), which is not yet implemented"] +#[ignore = "the plugin worker's Composer\\InstalledVersions is only reloaded on a repository write, never seeded from the project's installed.php at boot, so the fixture's plugins fail with `Package \"plugin/a\" is not installed`"] fn test_integration_installed_versions2() { run_integration("installed-versions2.test"); } diff --git a/crates/shirabe/tests/autoload/autoload_generator_test.rs b/crates/shirabe/tests/autoload/autoload_generator_test.rs index 4efcc7e0..0f1a42d2 100644 --- a/crates/shirabe/tests/autoload/autoload_generator_test.rs +++ b/crates/shirabe/tests/autoload/autoload_generator_test.rs @@ -1745,7 +1745,7 @@ fn test_exclude_from_classmap() { } #[test] -#[ignore = "require autoload.php + function_exists() assertions are unportable (composer_require todo!())"] +#[ignore = "asserts function_exists() after requiring the generated autoload.php inside the test process; there is no PHP interpreter to evaluate that file"] fn test_files_autoload_order_by_dependencies() { // TODO(php-runtime): PHP `require autoload.php` + function_exists() assertions have no Rust // equivalent (no runtime PHP file loading/class definition). diff --git a/crates/shirabe/tests/autoload/class_loader_test.rs b/crates/shirabe/tests/autoload/class_loader_test.rs index 00cda87d..6e0d46dd 100644 --- a/crates/shirabe/tests/autoload/class_loader_test.rs +++ b/crates/shirabe/tests/autoload/class_loader_test.rs @@ -13,7 +13,7 @@ fn get_load_class_tests() -> Vec<&'static str> { } #[test] -#[ignore = "shirabe_php_shim::class_exists models a fixed set of classes available in a PHP CLI environment; loadClass cannot add to it because including a PHP file does not define a class on the Rust side"] +#[ignore = "loadClass reaches shirabe_php_shim::include_file, which is a todo!(): evaluating a PHP source file needs an interpreter. class_exists also models a fixed set of classes that loading a file cannot extend"] fn test_load_class() { let fixtures = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) .join("../../composer/tests/Composer/Test/Autoload/Fixtures") diff --git a/crates/shirabe/tests/util/auth_helper_test.rs b/crates/shirabe/tests/util/auth_helper_test.rs index 102a798c..732c8881 100644 --- a/crates/shirabe/tests/util/auth_helper_test.rs +++ b/crates/shirabe/tests/util/auth_helper_test.rs @@ -803,20 +803,21 @@ fn test_add_authentication_header_with_custom_headers() { } #[test] -#[ignore = "exercises the deprecated addAuthenticationHeader wrapper (not ported) which relies on \ -trigger_error/E_USER_DEPRECATED; the PHP error-handler subsystem is not modeled"] +#[ignore = "exercises the deprecated addAuthenticationHeader wrapper, which opens with \ +trigger_error(E_USER_DEPRECATED); shirabe_php_shim::trigger_error is a todo!()"] fn test_add_authentication_header_is_working() { - // TODO(php-runtime): see test_add_authentication_header_with_custom_headers above — same - // unported addAuthenticationHeader deprecated wrapper. + // TODO(php-runtime): see test_add_authentication_header_with_custom_headers above — the same + // trigger_error(E_USER_DEPRECATED) that opens addAuthenticationHeader. todo!() } #[test] -#[ignore = "exercises the deprecated addAuthenticationHeader wrapper (not ported) which relies on \ -trigger_error/E_USER_DEPRECATED converted to a RuntimeException via set_error_handler; not modeled"] +#[ignore = "asserts that the deprecated addAuthenticationHeader wrapper raises a RuntimeException \ +through a set_error_handler converting E_USER_DEPRECATED; shirabe_php_shim::trigger_error is a \ +todo!() and set_error_handler is a no-op"] fn test_add_authentication_header_deprecation() { // TODO(php-runtime): asserts that calling addAuthenticationHeader itself raises a - // RuntimeException via a custom set_error_handler converting E_USER_DEPRECATED; same - // unported wrapper and unmodeled error-handler subsystem as the two tests above. + // RuntimeException via a custom set_error_handler converting E_USER_DEPRECATED; the same + // trigger_error todo!() and unmodeled error-handler subsystem as the two tests above. todo!() } -- cgit v1.3.1-4-g156e