diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 05:13:03 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 05:13:03 +0900 |
| commit | 3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d (patch) | |
| tree | b18aeb4b6b98ea2c74450b8c38e99c7607bd66c0 /crates/shirabe/tests/plugin | |
| parent | 25f96cab45f5da4fba2ef0486a0b0bc8f7ca87b0 (diff) | |
| download | php-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.tar.gz php-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.tar.zst php-shirabe-3efcd8d338aa49efb0c9075c0f7a4dd4e4138b7d.zip | |
test: port package archiver/loader/version/locker and PluginInstaller stubs
All ignored: ArrayLoader/ValidatingArrayLoader/VersionSelector parse
constraints via a look-around regex; ArchiveManager uses PharData (todo!());
ArchivableFilesFinder/VersionGuesser/Locker mock git/process/IO; the plugin API
is not implemented (TODO(plugin)). Wires up the plugin test target.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/plugin')
| -rw-r--r-- | crates/shirabe/tests/plugin/main.rs | 1 | ||||
| -rw-r--r-- | crates/shirabe/tests/plugin/plugin_installer_test.rs | 29 |
2 files changed, 30 insertions, 0 deletions
diff --git a/crates/shirabe/tests/plugin/main.rs b/crates/shirabe/tests/plugin/main.rs new file mode 100644 index 0000000..4470522 --- /dev/null +++ b/crates/shirabe/tests/plugin/main.rs @@ -0,0 +1 @@ +mod plugin_installer_test; diff --git a/crates/shirabe/tests/plugin/plugin_installer_test.rs b/crates/shirabe/tests/plugin/plugin_installer_test.rs index 767a478..4fed7c6 100644 --- a/crates/shirabe/tests/plugin/plugin_installer_test.rs +++ b/crates/shirabe/tests/plugin/plugin_installer_test.rs @@ -1 +1,30 @@ //! ref: composer/tests/Composer/Test/Plugin/PluginInstallerTest.php + +// The plugin system requires the PHP runtime to load and instantiate plugin classes; the +// PluginManager/PluginInstaller is intentionally not implemented yet (TODO(plugin)). +macro_rules! stub { + ($name:ident) => { + #[test] + #[ignore = "the plugin API (PluginManager/PluginInstaller loading PHP plugin classes) is not implemented yet"] + fn $name() { + todo!() + } + }; +} + +stub!(test_install_new_plugin); +stub!(test_install_plugin_with_root_package_having_files_autoload); +stub!(test_install_multiple_plugins); +stub!(test_upgrade_with_new_class_name); +stub!(test_uninstall); +stub!(test_upgrade_with_same_class_name); +stub!(test_register_plugin_only_one_time); +stub!(test_star_plugin_version_works_with_any_api_version); +stub!(test_plugin_constraint_works_only_with_certain_api_version); +stub!(test_plugin_range_constraints_work_only_with_certain_api_version); +stub!(test_command_provider_capability); +stub!(test_incapable_plugin_is_correctly_detected); +stub!(test_capability_implements_composer_plugin_api_class_and_is_constructed_with_args); +stub!(test_querying_with_invalid_capability_class_name_throws); +stub!(test_querying_non_provided_capability_returns_null_safely); +stub!(test_querying_with_non_existing_or_wrong_capability_class_types_throws); |
