diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-07-11 20:09:27 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-07-16 01:02:47 +0900 |
| commit | 6f55caac4e6e55661305311174e31ec2b0e375b6 (patch) | |
| tree | 7ae39ecfd175ccda96e970db348f00d0c6dc7c1a /crates/shirabe/tests/autoload | |
| parent | da751367b50ec4c680aa5f45d3ce0d192d647dbb (diff) | |
| download | php-shirabe-6f55caac4e6e55661305311174e31ec2b0e375b6.tar.gz php-shirabe-6f55caac4e6e55661305311174e31ec2b0e375b6.tar.zst php-shirabe-6f55caac4e6e55661305311174e31ec2b0e375b6.zip | |
test: update TODO reason for unported test cases
No test logic changes.
Diffstat (limited to 'crates/shirabe/tests/autoload')
| -rw-r--r-- | crates/shirabe/tests/autoload/autoload_generator_test.rs | 27 | ||||
| -rw-r--r-- | crates/shirabe/tests/autoload/class_loader_test.rs | 9 |
2 files changed, 19 insertions, 17 deletions
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!() } |
