-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #45 from wp-cli/handle-old-syntax-gracefully
Test graceful handling of old config syntax
- Loading branch information
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Feature: Backwards compatibility | ||
|
||
Scenario: wp config get --constant=<constant> --> wp config get <name> --type=constant | ||
Given a WP install | ||
|
||
When I run `wp config get --constant=DB_NAME` | ||
Then STDOUT should be: | ||
""" | ||
wp_cli_test | ||
""" | ||
|
||
Scenario: wp config get --global=<global> --> wp config get <name> --type=variable | ||
Given a WP install | ||
|
||
When I run `wp config get --global=table_prefix` | ||
Then STDOUT should be: | ||
""" | ||
wp_ | ||
""" | ||
|
||
Scenario: wp config get --> wp config list | ||
Given an empty directory | ||
And WP files | ||
|
||
When I run `wp core config {CORE_CONFIG_SETTINGS}` | ||
Then STDOUT should contain: | ||
""" | ||
Generated 'wp-config.php' file. | ||
""" | ||
|
||
When I run `wp config get --fields=name,type` | ||
Then STDOUT should be a table containing rows: | ||
| name | type | | ||
| DB_NAME | constant | | ||
| DB_USER | constant | | ||
| DB_PASSWORD | constant | | ||
| DB_HOST | constant | | ||
|
||
When I try `wp config get` | ||
Then STDOUT should be a table containing rows: | ||
| name | value | type | |