From 3ddd6591b9384ef9b4f6c56580d35ce01ed0c7fb Mon Sep 17 00:00:00 2001 From: Alain Schlesser Date: Thu, 23 Jul 2026 07:41:54 +0200 Subject: [PATCH] Modernize deprecated syntax in Behat tests WP-CLI now emits deprecation warnings when it rewrites legacy command syntax. Use the modern forms in the Behat scenarios so the standard run step can continue to require clean STDERR. --- features/plugin-uninstall.feature | 2 +- features/plugin.feature | 4 ++-- features/theme.feature | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/features/plugin-uninstall.feature b/features/plugin-uninstall.feature index 8292fe709..a2a1a9e27 100644 --- a/features/plugin-uninstall.feature +++ b/features/plugin-uninstall.feature @@ -160,7 +160,7 @@ Feature: Uninstall a WordPress plugin Scenario: Uninstalling a plugin should remove its language pack Given a WP install And I run `wp plugin install wordpress-importer` - And I run `wp core language install fr_FR` + And I run `wp language core install fr_FR` And I run `wp site switch-language fr_FR` When I run `wp language plugin install wordpress-importer fr_FR` diff --git a/features/plugin.feature b/features/plugin.feature index ec1f11928..5992e7227 100644 --- a/features/plugin.feature +++ b/features/plugin.feature @@ -5,7 +5,7 @@ Feature: Manage WordPress plugins And I run `wp plugin path` And save STDOUT as {PLUGIN_DIR} - When I run `wp plugin scaffold --skip-tests plugin1` + When I run `wp scaffold plugin --skip-tests plugin1` Then STDOUT should not be empty And the {PLUGIN_DIR}/plugin1/plugin1.php file should exist And the {PLUGIN_DIR}/zombieland/phpunit.xml.dist file should not exist @@ -22,7 +22,7 @@ Feature: Manage WordPress plugins {PLUGIN_DIR}/plugin1 """ - When I run `wp plugin scaffold Zombieland` + When I run `wp scaffold plugin Zombieland` Then STDOUT should not be empty And the {PLUGIN_DIR}/Zombieland/Zombieland.php file should exist And the {PLUGIN_DIR}/Zombieland/phpunit.xml.dist file should exist diff --git a/features/theme.feature b/features/theme.feature index ff9c1cc16..43d894e90 100644 --- a/features/theme.feature +++ b/features/theme.feature @@ -359,7 +359,7 @@ Feature: Manage WordPress themes """ # Hybrid_Registry throws warning for PHP 8+. - When I try `wp network-meta get 1 allowedthemes` + When I try `wp network meta get 1 allowedthemes` Then STDOUT should not contain: """ 'moina-blog' => true @@ -373,7 +373,7 @@ Feature: Manage WordPress themes """ # Hybrid_Registry throws warning for PHP 8+. - When I try `wp network-meta get 1 allowedthemes` + When I try `wp network meta get 1 allowedthemes` Then STDOUT should contain: """ 'moina-blog' => true @@ -387,7 +387,7 @@ Feature: Manage WordPress themes """ # Hybrid_Registry throws warning for PHP 8+. - When I try `wp network-meta get 1 allowedthemes` + When I try `wp network meta get 1 allowedthemes` Then STDOUT should not contain: """ 'moina-blog' => true