File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -929,24 +929,27 @@ Feature: Search through the database
929929 And STDERR should be empty
930930
931931 Scenario : Search with exclude revisions option
932- Given a WP install
933- And I run `wp post create --post_content= "This is the original post content." --post_title= "Original Post" `
932+ And I run `wp post create --post_content= "This is the original post content." --post_title= "Original Post" --porcelain`
933+ Then save STDOUT as {POST_ID}
934934 # Create a revision
935- And I run `wp post update 1 --post_content="This is the updated post content." `
935+ And I run `wp post update {POST_ID} --post_content="This is the updated post content." `
936+ When I run `wp post list --post_parent={POST_ID} --post_type=revision --field=ID`
937+ Then save STDOUT as {REVISION_ID}
938+
936939 When I run `wp db search "updated post content" `
937940 Then STDOUT should contain:
938941 """
939942 wp_posts:post_content
940- 1 :This is the updated post content.
943+ {POST_ID} :This is the updated post content.
941944 wp_posts:post_content
942- 5 :This is the updated post content.
945+ {REVISION_ID} :This is the updated post content.
943946 """
944-
947+
945948 When I run `wp db search "updated post content" --exclude_revisions`
946949 Then STDOUT should contain:
947950 """
948951 wp_posts:post_content
949- 1 :This is the updated post content.
952+ {POST_ID} :This is the updated post content.
950953 """
951954 And STDERR should be empty
952955
You can’t perform that action at this time.
0 commit comments