diff options
Diffstat (limited to 'crates')
10 files changed, 85 insertions, 17 deletions
diff --git a/crates/shirabe/tests/application_test.rs b/crates/shirabe/tests/application_test.rs index df5f6e4f..2bb2b68a 100644 --- a/crates/shirabe/tests/application_test.rs +++ b/crates/shirabe/tests/application_test.rs @@ -44,6 +44,8 @@ fn test_dev_warning() { let _tear_down = TearDown; set_up(); + // TODO(phase-d): no define() setter exists for the COMPOSER_DEV_WARNING_TIME constant (the + // shim's defined() is a fixed matches!), so this test's runtime define() cannot be reproduced. todo!() } diff --git a/crates/shirabe/tests/autoload/autoload_generator_test.rs b/crates/shirabe/tests/autoload/autoload_generator_test.rs index d7159c27..1f702e9c 100644 --- a/crates/shirabe/tests/autoload/autoload_generator_test.rs +++ b/crates/shirabe/tests/autoload/autoload_generator_test.rs @@ -1731,51 +1731,51 @@ fn test_exclude_from_classmap() { assert_autoload_files("classmap", &composer_out, "classmap"); } -// These remain ignored: they need test infrastructure not yet ported. -// -// - testFilesAutoloadOrderByDependencies / testFilesAutoloadGeneration's `require autoload.php` -// + function_exists assertions: PHP runtime require is unportable (composer_require todo!()). -// - testFilesAutoloadGenerationRemoveExtraEntitiesFromAutoloadFiles: needs getCanonicalPackages -// returnValueMap over consecutive calls (the repo mock yields different package sets per call). -// - testIncludePathsArePrependedInAutoloadFile / testIncludePathsInRootPackage / -// testUseGlobalIncludePath: assert PHP's get_include_path() after `require autoload.php`. -// - testPreAndPostEventsAreDispatchedDuringAutoloadDump: EventDispatcher::dispatchScript spy. -// - testAutoloadRulesInPackageThatDoesNotExistOnDisk: exercises buildPackageMap/parseAutoloads -// directly plus a CompletePackage; multi-dump with mutation. - #[test] #[ignore = "require autoload.php + function_exists() assertions are unportable (composer_require todo!())"] fn test_files_autoload_order_by_dependencies() { + // TODO(phase-d): PHP `require autoload.php` + function_exists() assertions have no Rust + // equivalent (no runtime PHP file loading/class definition). todo!() } #[test] #[ignore = "needs getCanonicalPackages consecutive-call return values (different package set per dump)"] fn test_files_autoload_generation_remove_extra_entities_from_autoload_files() { + // TODO(phase-d): needs a repository mock returning a different package set on each of several + // consecutive dump() calls (PHPUnit consecutive-call mock); not modeled by InstalledArrayRepository. todo!() } #[test] #[ignore = "asserts PHP get_include_path() after require autoload.php"] fn test_include_paths_are_prepended_in_autoload_file() { + // TODO(phase-d): asserts PHP get_include_path() after `require autoload.php`; no Rust + // equivalent for PHP's include path / runtime require. todo!() } #[test] #[ignore = "asserts PHP get_include_path() after require autoload.php"] fn test_include_paths_in_root_package() { + // TODO(phase-d): asserts PHP get_include_path() after `require autoload.php`; no Rust + // equivalent for PHP's include path / runtime require. todo!() } #[test] #[ignore = "EventDispatcher::dispatchScript spy not modeled"] fn test_pre_and_post_events_are_dispatched_during_autoload_dump() { + // TODO(phase-d): requires spying on EventDispatcher::dispatchScript to record the events + // dispatched around the dump; no dispatcher spy/mock hook is modeled yet. todo!() } #[test] #[ignore = "asserts PHP get_include_path()/require behavior with use-include-path"] fn test_use_global_include_path() { + // TODO(phase-d): asserts PHP get_include_path()/require() behavior driven by the + // use-include-path setting; no Rust equivalent. todo!() } @@ -1975,6 +1975,9 @@ fn test_up_level_relative_paths() { #[test] #[ignore = "exercises buildPackageMap/parseAutoloads directly with multi-dump mutation"] fn test_autoload_rules_in_package_that_does_not_exist_on_disk() { + // TODO(phase-d): exercises AutoloadGenerator::buildPackageMap/parseAutoloads directly across + // multiple dump() calls with the package list mutated between calls; needs those internals + // exposed to tests. todo!() } diff --git a/crates/shirabe/tests/autoload/class_loader_test.rs b/crates/shirabe/tests/autoload/class_loader_test.rs index 66cc3e8a..582e24fa 100644 --- a/crates/shirabe/tests/autoload/class_loader_test.rs +++ b/crates/shirabe/tests/autoload/class_loader_test.rs @@ -2,12 +2,11 @@ use shirabe::autoload::class_loader::ClassLoader; -// In PHP, loadClass() includes the matching .php fixture and the assertion checks -// class_exists(). There is no equivalent runtime notion of loading and defining a -// class in Rust, so this case cannot be ported faithfully. #[test] #[ignore = "depends on PHP runtime class_exists() to verify loadClass defined a class; no Rust equivalent"] fn test_load_class() { + // TODO(phase-d): loadClass() include()s a fixture and PHPUnit asserts via class_exists(); + // Rust has no equivalent of runtime class definition/loading. todo!() } @@ -17,10 +16,10 @@ fn test_get_prefixes_with_no_psr0_configuration() { assert!(loader.get_prefixes().is_empty()); } -// In PHP this serializes the loader and unserializes it, then compares every getter. -// PHP serialize()/unserialize() has no Rust equivalent here. #[test] #[ignore = "depends on PHP serialize()/unserialize() round-trip of ClassLoader; no Rust equivalent"] fn test_serializability() { + // TODO(phase-d): serializes/unserializes the ClassLoader and compares every getter; PHP + // serialize()/unserialize() has no Rust equivalent here. todo!() } diff --git a/crates/shirabe/tests/command/run_script_command_test.rs b/crates/shirabe/tests/command/run_script_command_test.rs index 75cf6786..71747a4c 100644 --- a/crates/shirabe/tests/command/run_script_command_test.rs +++ b/crates/shirabe/tests/command/run_script_command_test.rs @@ -16,6 +16,12 @@ use shirabe_php_shim::PhpMixed; Reaching it would require adding as_any to EventInterface, i.e. a src change, which is \ forbidden here -- so the faithful body is currently inexpressible and is left as todo!()."] fn test_detect_and_pass_dev_mode_to_event_and_to_dispatching() { + // TODO(phase-d): PHP asserts the ScriptEvent passed to hasEventListeners has isDevMode() == + // (dev || !no_dev), but EventInterface (src/event_dispatcher/event.rs:49) has no as_any/downcast + // seam, so a trait object cannot reach the concrete ScriptEvent::is_dev_mode + // (src/script/event.rs:51). Reaching it would require adding as_any to EventInterface, i.e. a + // src change, which is forbidden here -- so the faithful body is currently inexpressible and is + // left as todo!(). todo!() } @@ -119,11 +125,17 @@ fn test_can_define_aliases() { #[test] #[ignore = "requires writing and executing a PHP-generated Symfony Command class (file_put_contents MyCommand.php) loaded via composer autoload; fundamentally unportable, no PHP runtime command loading in shirabe"] fn test_execution_of_simple_symfony_command() { + // TODO(phase-d): requires writing and executing a PHP-generated Symfony Command class + // (file_put_contents MyCommand.php) loaded via composer autoload; fundamentally unportable, no + // PHP runtime command loading in shirabe. todo!() } #[test] #[ignore = "requires writing and executing a PHP-generated Symfony Command class (file_put_contents MyCommandWithDefinitions.php) loaded via composer autoload; fundamentally unportable, no PHP runtime command loading in shirabe"] fn test_execution_of_symfony_command_with_configuration() { + // TODO(phase-d): requires writing and executing a PHP-generated Symfony Command class + // (file_put_contents MyCommandWithDefinitions.php) loaded via composer autoload; fundamentally + // unportable, no PHP runtime command loading in shirabe. todo!() } diff --git a/crates/shirabe/tests/command/self_update_command_test.rs b/crates/shirabe/tests/command/self_update_command_test.rs index 094eb5ee..3b73adbb 100644 --- a/crates/shirabe/tests/command/self_update_command_test.rs +++ b/crates/shirabe/tests/command/self_update_command_test.rs @@ -17,6 +17,9 @@ fn set_up() -> crate::test_case::TearDown { fn test_successful_update() { let _tear_down = set_up(); + // TODO(phase-d): spawns `new Process([PHP_BINARY, $this->phar, 'self-update'])` running + // composer-test.phar over HTTP; requires Symfony Process and the composer-test.phar fixture, + // neither ported. todo!() } @@ -28,6 +31,9 @@ fn test_successful_update() { fn test_update_to_specific_version() { let _tear_down = set_up(); + // TODO(phase-d): spawns `new Process([PHP_BINARY, $this->phar, 'self-update', '2.4.0'])` + // running composer-test.phar over HTTP; requires Symfony Process and the composer-test.phar + // fixture, neither ported. todo!() } @@ -63,5 +69,8 @@ fn test_update_with_invalid_option_throws_exception() { fn test_update_to_different_channel() { let _tear_down = set_up(); + // TODO(phase-d): spawns `new Process([PHP_BINARY, $this->phar, 'self-update', $option])` + // running composer-test.phar over HTTP (data provider: --stable/--preview/--snapshot); + // requires Symfony Process and the composer-test.phar fixture, neither ported. todo!() } diff --git a/crates/shirabe/tests/completion_functional_test.rs b/crates/shirabe/tests/completion_functional_test.rs index 06f8dd8a..82f42fbf 100644 --- a/crates/shirabe/tests/completion_functional_test.rs +++ b/crates/shirabe/tests/completion_functional_test.rs @@ -3,5 +3,7 @@ #[test] #[ignore = "CommandCompletionTester (Symfony Console test helper) is not implemented in the port"] fn test_complete() { + // TODO(phase-d): CommandCompletionTester (Symfony Console test helper) is not implemented in + // the port, so this data-provider-driven completion test has no harness to run against. todo!() } diff --git a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs index 67059a7c..2c38ae6a 100644 --- a/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs +++ b/crates/shirabe/tests/event_dispatcher/event_dispatcher_test.rs @@ -332,6 +332,8 @@ fn test_dispatcher_doesnt_return_skipped_scripts() { #[ignore = "listener `EventDispatcherTest::call` is a PHP-script callable; dynamic static-method invocation requires the plugin runtime (execute_event_php_script is todo!())"] fn test_listener_exceptions_are_caught() { let _tear_down = TearDown; + // TODO(phase-d): listener `EventDispatcherTest::call` is a PHP-script callable; dynamic + // static-method invocation requires the plugin runtime (execute_event_php_script is todo!()) todo!() } @@ -339,6 +341,8 @@ fn test_listener_exceptions_are_caught() { #[ignore = "requires a PHPUnit spy on AutoloadGenerator::setDevMode plus Event::isDevMode mocking; no mock infrastructure exists"] fn test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events() { let _tear_down = TearDown; + // TODO(phase-d): requires a PHPUnit spy on AutoloadGenerator::setDevMode plus Event::isDevMode + // mocking; no mock infrastructure exists todo!() } @@ -346,6 +350,9 @@ fn test_dispatcher_pass_dev_mode_to_autoload_generator_for_script_events() { #[ignore = "listeners are object-method array callables ([\\$this, 'someMethod']) invoked + removed by object identity; the array-callable invocation path is an unimplemented plugin-runtime stub"] fn test_dispatcher_remove_listener() { let _tear_down = TearDown; + // TODO(phase-d): listeners are object-method array callables ([$this, 'someMethod']) invoked + // and removed by object identity; the array-callable invocation path is an unimplemented + // plugin-runtime stub todo!() } @@ -353,6 +360,9 @@ fn test_dispatcher_remove_listener() { #[ignore = "mixes a PHP-script listener (EventDispatcherTest::someMethod) into the stack; dynamic static-method invocation requires the plugin runtime (execute_event_php_script is todo!())"] fn test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack() { let _tear_down = TearDown; + // TODO(phase-d): mixes a PHP-script listener (EventDispatcherTest::someMethod) into the + // stack; dynamic static-method invocation requires the plugin runtime + // (execute_event_php_script is todo!()) todo!() } @@ -360,6 +370,9 @@ fn test_dispatcher_can_execute_cli_and_php_in_same_event_script_stack() { #[ignore = "second listener EventDispatcherTest::getTestEnv is a PHP-script callable; dynamic static-method invocation requires the plugin runtime (execute_event_php_script is todo!())"] fn test_dispatcher_can_put_env() { let _tear_down = TearDown; + // TODO(phase-d): second listener EventDispatcherTest::getTestEnv is a PHP-script callable; + // dynamic static-method invocation requires the plugin runtime (execute_event_php_script is + // todo!()) todo!() } @@ -367,6 +380,9 @@ fn test_dispatcher_can_put_env() { #[ignore = "listeners are PHP-script callables (createsVendorBinFolderChecksEnv*) asserting on PATH; dynamic static-method invocation requires the plugin runtime (execute_event_php_script is todo!())"] fn test_dispatcher_appends_dir_bin_on_path_for_every_listener() { let _tear_down = TearDown; + // TODO(phase-d): listeners are PHP-script callables (createsVendorBinFolderChecksEnv*) + // asserting on PATH; dynamic static-method invocation requires the plugin runtime + // (execute_event_php_script is todo!()) todo!() } @@ -374,6 +390,8 @@ fn test_dispatcher_appends_dir_bin_on_path_for_every_listener() { #[ignore = "requires ReflectionMethod(getPhpExecCommand) and a real PHP binary to compute the expected @php command; getPhpExecCommand has no test seam"] fn test_dispatcher_support_for_additional_args() { let _tear_down = TearDown; + // TODO(phase-d): requires ReflectionMethod(getPhpExecCommand) and a real PHP binary to + // compute the expected @php command; getPhpExecCommand has no test seam todo!() } @@ -381,6 +399,8 @@ fn test_dispatcher_support_for_additional_args() { #[ignore = "uses an unmocked ProcessExecutor running a real `echo foo` and a PHPUnit IO spy on writeError/writeRaw; no real-shell-output IO mocking exists"] fn test_dispatcher_outputs_command() { let _tear_down = TearDown; + // TODO(phase-d): uses an unmocked ProcessExecutor running a real `echo foo` and a PHPUnit IO + // spy on writeError/writeRaw; no real-shell-output IO mocking exists todo!() } @@ -388,5 +408,7 @@ fn test_dispatcher_outputs_command() { #[ignore = "uses an unmocked ProcessExecutor running a real `exit 1`; depends on real shell execution"] fn test_dispatcher_outputs_error_on_failed_command() { let _tear_down = TearDown; + // TODO(phase-d): uses an unmocked ProcessExecutor running a real `exit 1`; depends on real + // shell execution todo!() } diff --git a/crates/shirabe/tests/installer/installation_manager_test.rs b/crates/shirabe/tests/installer/installation_manager_test.rs index e3e4c0fc..f60d1250 100644 --- a/crates/shirabe/tests/installer/installation_manager_test.rs +++ b/crates/shirabe/tests/installer/installation_manager_test.rs @@ -292,12 +292,18 @@ fn test_add_get_installer() { #[ignore = "removeInstaller compares installers by object identity, but add_installer moves the Box<dyn InstallerInterface> into the manager, leaving no &dyn reference to pass back to remove_installer; faithful reproduction needs a shared-ownership installer registry"] #[test] fn test_add_remove_installer() { + // TODO(phase-d): removeInstaller compares installers by object identity, but add_installer + // moves the Box<dyn InstallerInterface> into the manager, leaving no &dyn reference to pass + // back to remove_installer; faithful reproduction needs a shared-ownership installer registry. todo!() } #[ignore = "partial mock of InstallationManager (onlyMethods install/update/uninstall) with expects(once)->with(...) is not reproducible without method-overriding mocks; execute() also takes the batched download path"] #[test] fn test_execute() { + // TODO(phase-d): a partial mock of InstallationManager (onlyMethods install/update/uninstall) + // with expects(once)->with(...) is not reproducible without method-overriding mocks; execute() + // also takes the batched download path. todo!() } diff --git a/crates/shirabe/tests/io/console_io_test.rs b/crates/shirabe/tests/io/console_io_test.rs index 62cb8322..36ea4382 100644 --- a/crates/shirabe/tests/io/console_io_test.rs +++ b/crates/shirabe/tests/io/console_io_test.rs @@ -109,12 +109,18 @@ fn test_write() { #[ignore = "PHP mocks ConsoleOutputInterface so getErrorOutput returns the same mock; a real ConsoleOutput's error StreamOutput writes to php://stderr, which cannot be read back, and the trait offers no seam to inject a BufferedOutput error sink"] #[test] fn test_write_error() { + // TODO(phase-d): PHP mocks ConsoleOutputInterface so getErrorOutput returns the same mock; a + // real ConsoleOutput's error StreamOutput writes to php://stderr, which cannot be read back, + // and the trait offers no seam to inject a BufferedOutput error sink. todo!() } #[ignore = "ConsoleIO::write3 takes a single &str; the test feeds a 2-element array ['First line','Second lines'] and asserts a per-element regex on the debugging-prefixed messages array, which the &str signature cannot represent"] #[test] fn test_write_with_multiple_line_string_when_debugging() { + // TODO(phase-d): ConsoleIO::write3 takes a single &str; the test feeds a 2-element array + // ['First line','Second lines'] and asserts a per-element regex on the debugging-prefixed + // messages array, which the &str signature cannot represent. todo!() } @@ -263,5 +269,8 @@ fn test_has_authentication() { #[ignore = "data provider includes malformed-UTF-8 inputs (e.g. \\xFF, \\xC3\\x28); sanitize() takes PhpMixed::String which is UTF-8-only and cannot carry invalid bytes, so those cases are unrepresentable"] #[test] fn test_sanitize() { + // TODO(phase-d): the data provider includes malformed-UTF-8 inputs (e.g. \xFF, \xC3\x28); + // sanitize() takes PhpMixed::String which is UTF-8-only and cannot carry invalid bytes, so + // those cases are unrepresentable. todo!() } diff --git a/crates/shirabe/tests/package/dumper/array_dumper_test.rs b/crates/shirabe/tests/package/dumper/array_dumper_test.rs index ed4d35ab..430900c4 100644 --- a/crates/shirabe/tests/package/dumper/array_dumper_test.rs +++ b/crates/shirabe/tests/package/dumper/array_dumper_test.rs @@ -90,5 +90,9 @@ fn test_dump_abandoned_replacement() { #[test] #[ignore = "authors/scripts/funding data sets pass loosely-typed PHP arrays the narrowed Rust set_authors/set_scripts/set_funding types cannot represent, and the dumper re-wraps them; faithful all-or-nothing port blocked without loosening those production types"] fn test_keys() { + // TODO(phase-d): authors/scripts/funding data sets pass loosely-typed PHP arrays the + // narrowed Rust set_authors/set_scripts/set_funding types cannot represent, and the + // dumper re-wraps them; faithful all-or-nothing port blocked without loosening those + // production types. todo!() } |
