Skip to content

Commit 3ddd659

Browse files
committed
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.
1 parent 437e645 commit 3ddd659

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

‎features/plugin-uninstall.feature‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ Feature: Uninstall a WordPress plugin
160160
Scenario: Uninstalling a plugin should remove its language pack
161161
Given a WP install
162162
And I run `wp plugin install wordpress-importer`
163-
And I run `wp core language install fr_FR`
163+
And I run `wp language core install fr_FR`
164164
And I run `wp site switch-language fr_FR`
165165

166166
When I run `wp language plugin install wordpress-importer fr_FR`

‎features/plugin.feature‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Feature: Manage WordPress plugins
55
And I run `wp plugin path`
66
And save STDOUT as {PLUGIN_DIR}
77

8-
When I run `wp plugin scaffold --skip-tests plugin1`
8+
When I run `wp scaffold plugin --skip-tests plugin1`
99
Then STDOUT should not be empty
1010
And the {PLUGIN_DIR}/plugin1/plugin1.php file should exist
1111
And the {PLUGIN_DIR}/zombieland/phpunit.xml.dist file should not exist
@@ -22,7 +22,7 @@ Feature: Manage WordPress plugins
2222
{PLUGIN_DIR}/plugin1
2323
"""
2424

25-
When I run `wp plugin scaffold Zombieland`
25+
When I run `wp scaffold plugin Zombieland`
2626
Then STDOUT should not be empty
2727
And the {PLUGIN_DIR}/Zombieland/Zombieland.php file should exist
2828
And the {PLUGIN_DIR}/Zombieland/phpunit.xml.dist file should exist

‎features/theme.feature‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ Feature: Manage WordPress themes
359359
"""
360360

361361
# Hybrid_Registry throws warning for PHP 8+.
362-
When I try `wp network-meta get 1 allowedthemes`
362+
When I try `wp network meta get 1 allowedthemes`
363363
Then STDOUT should not contain:
364364
"""
365365
'moina-blog' => true
@@ -373,7 +373,7 @@ Feature: Manage WordPress themes
373373
"""
374374

375375
# Hybrid_Registry throws warning for PHP 8+.
376-
When I try `wp network-meta get 1 allowedthemes`
376+
When I try `wp network meta get 1 allowedthemes`
377377
Then STDOUT should contain:
378378
"""
379379
'moina-blog' => true
@@ -387,7 +387,7 @@ Feature: Manage WordPress themes
387387
"""
388388

389389
# Hybrid_Registry throws warning for PHP 8+.
390-
When I try `wp network-meta get 1 allowedthemes`
390+
When I try `wp network meta get 1 allowedthemes`
391391
Then STDOUT should not contain:
392392
"""
393393
'moina-blog' => true

0 commit comments

Comments
 (0)