File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,15 @@ Feature: Empty a WordPress site of its data
5959 {PAGE_ID}
6060 """
6161
62+ When I run `wp post create --post_title='Sticky Post' --post_content='This is just a sticky post' --porcelain`
63+ Then save STDOUT as {STICKY_POST_ID}
64+
65+ When I run `wp option set sticky_posts '[{STICKY_POST_ID}]' --format=json`
66+ Then STDOUT should be:
67+ """
68+ Success: Updated 'sticky_posts' option.
69+ """
70+
6271 When I run `wp site empty --yes`
6372 Then STDOUT should be:
6473 """
@@ -78,6 +87,12 @@ Feature: Empty a WordPress site of its data
7887 0
7988 """
8089
90+ When I run `wp option get sticky_posts --format=json`
91+ Then STDOUT should be:
92+ """
93+ []
94+ """
95+
8196 When I run `wp db query "SELECT COUNT(link_id) FROM wp_links;" `
8297 Then STDOUT should be:
8398 """
Original file line number Diff line number Diff line change @@ -204,6 +204,9 @@ private function insert_default_terms() {
204204 private function reset_options () {
205205 // Reset Privacy Policy value to prevent error.
206206 update_option ( 'wp_page_for_privacy_policy ' , 0 );
207+
208+ // Reset sticky posts option.
209+ update_option ( 'sticky_posts ' , [] );
207210 }
208211
209212 /**
You can’t perform that action at this time.
0 commit comments