Skip to content

Commit

Permalink
Behat examples aligned and other minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
renatonascalves committed Nov 8, 2017
1 parent 0079903 commit 9395ee7
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 24 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "buddypress/wp-cli-buddypress",
"type": "wp-cli-package",
"description": "WP-CLI commands for BuddyPress",
"description": "WP-CLI Community Package of BuddyPress commands",
"keywords": [ "wp-cli", "buddypress", "community", "wordpress", "bp" ],
"homepage": "https://github.com/buddypress/wp-cli-buddypress",
"license": "MIT",
Expand Down
22 changes: 11 additions & 11 deletions features/xprofile-data.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,33 @@ Feature: Manage BuddyPress XProfile Data

When I run `wp bp xprofile data set --field-id={FIELD_ID} --user-id={USER_ID} --value=foo`
Then STDOUT should contain:
"""
Updated
"""
"""
Updated
"""

When I run `wp bp xprofile data get --user-id={USER_ID} --field-id={FIELD_ID}`
Then STDOUT should be:
"""
foo
"""
"""
foo
"""

When I run `wp bp xprofile data get --user-id={USER_ID}`
Then STDOUT should be a table containing rows:
| field_id | field_name | value |
| {FIELD_ID} | Field Name | "foo" |
| {FIELD_ID} | Field Name | "foo" |

When I try `wp bp xprofile data delete --user-id={USER_ID} --yes`
Then the return code should be 1
Then STDERR should contain:
"""
Either --field-id or --delete-all must be provided
"""
Either --field-id or --delete-all must be provided
"""

When I run `wp bp xprofile data delete --user-id={USER_ID} --field-id={FIELD_ID} --yes`
Then STDOUT should contain:
"""
XProfile data removed
"""
XProfile data removed
"""

When I run `wp bp xprofile data get --user-id={USER_ID} --field-id={FIELD_ID}`
Then STDOUT should not contain:
Expand Down
6 changes: 3 additions & 3 deletions features/xprofile-field.feature
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Feature: Manage BuddyPress XProfile Fields

When I run `wp bp xprofile field delete {FIELD_ID} --yes`
Then STDOUT should contain:
"""
Deleted XProfile field
"""
"""
Deleted XProfile field
"""

When I try `wp bp xprofile field delete {FIELD_ID} --yes`
Then the return code should be 1
18 changes: 9 additions & 9 deletions features/xprofile-group.feature
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,18 @@ Feature: Manage BuddyPress XProfile Groups

When I run `wp bp xprofile group get {GROUP_ID}`
Then STDOUT should be a table containing rows:
| Field | Value |
| id | {GROUP_ID} |
| name | Group Name |
| description | Group Description |
| can_delete | 1 |
| group_order | 0 |
| Field | Value |
| id | {GROUP_ID} |
| name | Group Name |
| description | Group Description |
| can_delete | 1 |
| group_order | 0 |

When I run `wp bp xprofile group delete {GROUP_ID} --yes`
Then STDOUT should contain:
"""
Field group deleted.
"""
"""
Field group deleted.
"""

When I try `wp bp xprofile group get {GROUP_ID}`
Then the return code should be 1
2 changes: 2 additions & 0 deletions wp-cli.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
- wp-cli-bp.php

0 comments on commit 9395ee7

Please sign in to comment.