From 506a20ad8acc638efc4cb87413d7230c7f256b1e Mon Sep 17 00:00:00 2001 From: Daniel Bachhuber Date: Fri, 8 Dec 2023 14:19:52 -0800 Subject: [PATCH] Switch tests to use `site-secrets` instead of `user-switching` (#389) * Switch tests to use `site-secrets` instead of `user-switching` User Switching increased its minimum supported PHP version, and started breaking our tests. Time to use Daniel's plugin instead! Sorry John. * Remove unused variable to fix PHPCS warning * Drop Jetpack because it fails tests * Update command description --- features/plugin-activate.feature | 6 +++--- features/plugin-install.feature | 24 ++++++++++++------------ features/plugin.feature | 11 +++++------ src/WP_CLI/CommandWithUpgrade.php | 4 ++-- 4 files changed, 22 insertions(+), 23 deletions(-) diff --git a/features/plugin-activate.feature b/features/plugin-activate.feature index 9cbae57c..c4b9479a 100644 --- a/features/plugin-activate.feature +++ b/features/plugin-activate.feature @@ -35,7 +35,7 @@ Feature: Activate WordPress plugins And the return code should be 1 Scenario: Activate all when one plugin is hidden by "all_plugins" filter - Given I run `wp plugin install user-switching` + Given I run `wp plugin install site-secrets` And a wp-content/mu-plugins/hide-us-plugin.php file: """ parse_url_host_component( $slug, PHP_URL_PATH ), '.zip' ); @@ -193,7 +193,7 @@ public function install( $args, $assoc_args ) { return new WP_Error( 'wpcli_install_github', "Couldn't move Github-based project to appropriate directory." ); }; - add_filter( 'upgrader_source_selection', $filter, 10, 3 ); + add_filter( 'upgrader_source_selection', $filter, 10 ); } if ( $file_upgrader->install( $slug ) ) {