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 @@ -44,6 +44,15 @@ Feature: Empty a WordPress site of its data
4444 {PAGE_ID}
4545 """
4646
47+ When I run `wp post create --post_title='Sticky Post' --post_content='This is just a sticky post' --porcelain`
48+ Then save STDOUT as {STICKY_POST_ID}
49+
50+ When I run `wp option set sticky_posts '[{STICKY_POST_ID}]' --format=json`
51+ Then STDOUT should be:
52+ """
53+ Success: Updated 'sticky_posts' option.
54+ """
55+
4756 When I run `wp site empty --yes`
4857 Then STDOUT should be:
4958 """
@@ -63,6 +72,12 @@ Feature: Empty a WordPress site of its data
6372 0
6473 """
6574
75+ When I run `wp option get sticky_posts --format=json`
76+ Then STDOUT should be:
77+ """
78+ []
79+ """
80+
6681 Scenario : Empty a site and its uploads directory
6782 Given a WP multisite installation
6883 And I run `wp site create --slug=foo`
Original file line number Diff line number Diff line change @@ -176,6 +176,9 @@ private function insert_default_terms() {
176176 private function reset_options () {
177177 // Reset Privacy Policy value to prevent error.
178178 update_option ( 'wp_page_for_privacy_policy ' , 0 );
179+
180+ // Reset sticky posts option.
181+ update_option ( 'sticky_posts ' , [] );
179182 }
180183
181184 /**
You can’t perform that action at this time.
0 commit comments