Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions features/term.feature
Original file line number Diff line number Diff line change
Expand Up @@ -280,3 +280,21 @@ Feature: Manage WordPress terms
"""
Success: Term updated.
"""

Scenario: Term list includes term_group as optional field
When I run `wp term create category 'Group Test' --slug=group-test --description='Test term_group field'`
Then STDOUT should not be empty

When I run `wp term list category --format=csv --fields=name,term_group`
Then STDOUT should contain:
"""
term_group
"""

When I run `wp term list category --format=json --fields=term_id,name,term_group`
Then STDOUT should be JSON containing:
"""
[{
"term_group":0
}]
"""
1 change: 1 addition & 0 deletions src/Term_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class Term_Command extends WP_CLI_Command {
*
* These fields are optionally available:
*
* * term_group
* * url
*
* ## EXAMPLES
Expand Down