OXIESEC PANEL
- Current Dir:
/
/
opt
/
.wp-cli
/
packages
/
vendor
/
wp-cli
/
entity-command
/
features
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/06/2025 12:29:47 PM
rwxr-xr-x
📄
comment-generate.feature
905 bytes
03/20/2024 11:17:27 AM
rw-r--r--
📄
comment-list.feature
1.04 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
comment-meta.feature
2.33 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
comment-recount.feature
877 bytes
05/14/2024 01:45:25 PM
rw-r--r--
📄
comment.feature
13.17 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
menu-item.feature
7.68 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
menu-location.feature
1.88 KB
05/14/2024 01:45:25 PM
rw-r--r--
📄
menu.feature
2.05 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
network-meta.feature
418 bytes
03/20/2024 11:17:27 AM
rw-r--r--
📄
option-get-autoload.feature
826 bytes
05/14/2024 01:45:25 PM
rw-r--r--
📄
option-list.feature
5.89 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
option-pluck-patch.feature
7.73 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
option-set-autoload.feature
1.96 KB
05/14/2024 01:45:25 PM
rw-r--r--
📄
option.feature
8.17 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
post-create-duplicate.feature
2.79 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
post-generate.feature
5.71 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
post-meta-clean-duplicates.feature
1.67 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
post-meta.feature
14.7 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
post-term.feature
5.37 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
post-type.feature
1.46 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
post-url-to-id.feature
564 bytes
05/14/2024 01:45:25 PM
rw-r--r--
📄
post.feature
16.49 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
signup.feature
5.52 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
site-create.feature
3.36 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
site-empty.feature
4.2 KB
05/14/2024 01:45:25 PM
rw-r--r--
📄
site-generate.feature
3.38 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
site-meta.feature
864 bytes
03/20/2024 11:17:27 AM
rw-r--r--
📄
site-option-pluck-patch.feature
6.83 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
site-option.feature
3.64 KB
05/14/2024 01:45:25 PM
rw-r--r--
📄
site.feature
20.81 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
taxonomy.feature
5.6 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
term-generate.feature
810 bytes
03/20/2024 11:17:27 AM
rw-r--r--
📄
term-meta.feature
849 bytes
03/20/2024 11:17:27 AM
rw-r--r--
📄
term-migrate.feature
2.97 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
term-recount.feature
1.6 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
term.feature
8 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
user-application-password.feature
10.26 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
user-generate.feature
1.05 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
user-import-csv.feature
5.32 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
user-list.feature
1.09 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
user-meta.feature
7.31 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
user-reset-password.feature
2.12 KB
03/20/2024 11:17:27 AM
rw-r--r--
📄
user-session.feature
944 bytes
09/06/2025 12:29:47 PM
rw-r--r--
📄
user-term.feature
2.82 KB
09/06/2025 12:29:47 PM
rw-r--r--
📄
user.feature
20.52 KB
09/06/2025 12:29:47 PM
rw-r--r--
Editing: comment.feature
Close
Feature: Manage WordPress comments Background: Given a WP install Scenario: Creating/updating/deleting comments When I run `wp comment create --comment_post_ID=1 --comment_content='Hello' --comment_author='Billy' --porcelain` Then STDOUT should be a number And save STDOUT as {COMMENT_ID} When I run `wp comment exists {COMMENT_ID}` Then STDOUT should be: """ Success: Comment with ID {COMMENT_ID} exists. """ When I run `wp comment update {COMMENT_ID} --comment_author='Johnny'` Then STDOUT should not be empty When I run `wp comment get {COMMENT_ID} --field=author` Then STDOUT should be: """ Johnny """ When I run `wp comment delete {COMMENT_ID}` Then STDOUT should be: """ Success: Trashed comment {COMMENT_ID}. """ When I run `wp comment get {COMMENT_ID} --field=comment_approved` Then STDOUT should be: """ trash """ When I run `wp comment delete {COMMENT_ID} --force` Then STDOUT should be: """ Success: Deleted comment {COMMENT_ID}. """ When I try `wp comment get {COMMENT_ID}` Then STDERR should be: """ Error: Invalid comment ID. """ And the return code should be 1 When I run `wp comment create --comment_post_ID=1` And I run `wp comment create --comment_post_ID=1` And I run `wp comment delete 3 4` Then STDOUT should be: """ Success: Trashed comment 3. Success: Trashed comment 4. """ When I run `wp comment delete 3` Then STDOUT should be: """ Success: Deleted comment 3. """ When I try `wp comment get 3` Then STDERR should be: """ Error: Invalid comment ID. """ And the return code should be 1 Scenario: Updating an invalid comment should return an error Given a WP install When I try `wp comment update 22 --comment_author=Foo` Then the return code should be 1 And STDERR should contain: """ Warning: Could not update comment. """ Scenario: Get details about an existing comment When I run `wp comment get 1` Then STDOUT should be a table containing rows: | Field | Value | | comment_approved | 1 | When I run `wp comment get 1 --fields=comment_approved --format=json` Then STDOUT should be JSON containing: """ {"comment_approved":"1"} """ When I run `wp comment list --fields=comment_approved` Then STDOUT should be a table containing rows: | comment_approved | | 1 | When I run `wp comment list --field=approved` Then STDOUT should be: """ 1 """ When I run `wp comment list --format=ids` Then STDOUT should be: """ 1 """ When I run `wp comment url 1` Then STDOUT should contain: """ #comment-1 """ When I run `wp comment get 1 --field=url` Then STDOUT should contain: """ #comment-1 """ Scenario: List the URLs of comments When I run `wp comment create --comment_post_ID=1 --porcelain` Then save STDOUT as {COMMENT_ID} When I run `wp comment url 1 {COMMENT_ID}` Then STDOUT should be: """ https://example.com/?p=1#comment-1 https://example.com/?p=1#comment-{COMMENT_ID} """ When I run `wp comment url {COMMENT_ID} 1` Then STDOUT should be: """ https://example.com/?p=1#comment-{COMMENT_ID} https://example.com/?p=1#comment-1 """ Scenario: Count comments When I run `wp comment count 1` Then STDOUT should contain: """ approved: 1 """ And STDOUT should contain: """ moderated: 0 """ And STDOUT should contain: """ total_comments: 1 """ When I run `wp comment count` Then STDOUT should contain: """ approved: 1 """ And STDOUT should contain: """ moderated: 0 """ And STDOUT should contain: """ total_comments: 1 """ @require-mysql Scenario: Approving/unapproving comments Given I run `wp comment create --comment_post_ID=1 --comment_approved=0 --porcelain` And save STDOUT as {COMMENT_ID} # With site url set. When I run `wp comment approve {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ When I try the previous command again Then STDERR should contain: """ Error: Could not update comment status """ And STDOUT should be empty And the return code should be 1 When I run `wp comment get --field=comment_approved {COMMENT_ID}` Then STDOUT should be: """ 1 """ When I run `wp comment unapprove {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ When I run `wp comment get --field=comment_approved {COMMENT_ID}` Then STDOUT should be: """ 0 """ # Without site url set. When I try `wp comment approve {COMMENT_ID}` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 When I try `wp comment unapprove {COMMENT_ID}` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 # Approving an approved comment works in SQLite @require-sqlite Scenario: Approving/unapproving comments Given I run `wp comment create --comment_post_ID=1 --comment_approved=0 --porcelain` And save STDOUT as {COMMENT_ID} # With site url set. When I run `wp comment approve {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ When I try the previous command again Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ When I run `wp comment get --field=comment_approved {COMMENT_ID}` Then STDOUT should be: """ 1 """ When I run `wp comment unapprove {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ When I run `wp comment get --field=comment_approved {COMMENT_ID}` Then STDOUT should be: """ 0 """ # Without site url set. When I try `wp comment approve {COMMENT_ID}` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 When I try `wp comment unapprove {COMMENT_ID}` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 Scenario: Approving/unapproving comments with multidigit comment ID Given I run `wp comment delete $(wp comment list --field=ID)` And I run `wp comment generate --count=10 --quiet` And I run `wp comment create --comment_post_ID=1 --porcelain` And save STDOUT as {COMMENT_ID} # With site url set. When I run `wp comment unapprove {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ When I run `wp comment list --format=count --status=approve` Then STDOUT should be: """ 10 """ When I run `wp comment approve {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ When I run `wp comment list --format=count --status=approve` Then STDOUT should be: """ 11 """ # Without site url set. When I try `wp comment unapprove {COMMENT_ID}` Then STDOUT should be: """ Success: Unapproved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 When I try `wp comment approve {COMMENT_ID}` Then STDOUT should be: """ Success: Approved comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 Scenario: Spam/unspam comments with multidigit comment ID Given I run `wp comment delete $(wp comment list --field=ID)` And I run `wp comment generate --count=10 --quiet` And I run `wp comment create --comment_post_ID=1 --porcelain` And save STDOUT as {COMMENT_ID} # With site url set. When I run `wp comment spam {COMMENT_ID}` Then STDOUT should be: """ Success: Marked comment {COMMENT_ID} as spam. """ When I run `wp comment list --format=count --status=spam` Then STDOUT should be: """ 1 """ When I run `wp comment unspam {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Unspammed comment {COMMENT_ID}. """ When I run `wp comment list --format=count --status=spam` Then STDOUT should be: """ 0 """ # Without site url set. When I run `wp comment spam {COMMENT_ID}` Then STDOUT should be: """ Success: Marked comment {COMMENT_ID} as spam. """ When I try `wp comment unspam {COMMENT_ID}` Then STDOUT should be: """ Success: Unspammed comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 Scenario: Trash/untrash comments with multidigit comment ID Given I run `wp comment delete $(wp comment list --field=ID) --force` And I run `wp comment generate --count=10 --quiet` And I run `wp comment create --comment_post_ID=1 --porcelain` And save STDOUT as {COMMENT_ID} # With site url set. When I run `wp comment trash {COMMENT_ID}` Then STDOUT should be: """ Success: Trashed comment {COMMENT_ID}. """ When I run `wp comment list --format=count --status=trash` Then STDOUT should be: """ 1 """ When I run `wp comment untrash {COMMENT_ID} --url=www.example.com` Then STDOUT should be: """ Success: Untrashed comment {COMMENT_ID}. """ When I run `wp comment list --format=count --status=trash` Then STDOUT should be: """ 0 """ # Without site url set. When I run `wp comment trash {COMMENT_ID}` Then STDOUT should be: """ Success: Trashed comment {COMMENT_ID}. """ When I try `wp comment untrash {COMMENT_ID}` Then STDOUT should be: """ Success: Untrashed comment {COMMENT_ID}. """ And STDERR should be: """ Warning: Site url not set - defaulting to 'example.com'. Any notification emails sent to post author may appear to come from 'example.com'. """ And the return code should be 0 Scenario: Make sure WordPress receives the slashed data it expects When I run `wp comment create --comment_content='My\Comment' --porcelain` Then save STDOUT as {COMMENT_ID} When I run `wp comment get {COMMENT_ID} --field=comment_content` Then STDOUT should be: """ My\Comment """ When I run `wp comment update {COMMENT_ID} --comment_content='My\New\Comment'` Then STDOUT should not be empty When I run `wp comment get {COMMENT_ID} --field=comment_content` Then STDOUT should be: """ My\New\Comment """ @require-wp-4.4 Scenario: Approving/unapproving/unspamming/untrashing (approved) comments with no comment post id should not produce PHP notices for WP >= 4.4 Given I run `wp comment create --comment_approved=0 --porcelain` And save STDOUT as {COMMENT_ID} When I run `wp comment approve {COMMENT_ID} --url=www.example.com` And I run `wp comment unapprove {COMMENT_ID} --url=www.example.com` Given I run `wp comment approve {COMMENT_ID} --url=www.example.com` When I run `wp comment spam {COMMENT_ID} --url=www.example.com` And I run `wp comment unspam {COMMENT_ID} --url=www.example.com` And I run `wp comment trash {COMMENT_ID} --url=www.example.com` And I run `wp comment untrash {COMMENT_ID} --url=www.example.com`