@@ -180,6 +180,112 @@ Feature: Manage WordPress options
180180 | option_name | option_value | autoload |
181181 | hello | island | on |
182182
183+ @less-than-wp-6.6
184+ Scenario: Update autoload value for custom option with an unchanged value
185+ Given a WP install
186+ And I run `wp option add hello world --autoload=yes`
187+
188+ When I run `wp option update hello world --autoload=no`
189+ Then STDOUT should be:
190+ """
191+ Success: Updated autoload value for 'hello' option.
192+ """
193+
194+ When I run `wp option get-autoload hello`
195+ Then STDOUT should be:
196+ """
197+ no
198+ """
199+
200+ When I run `wp option update hello world --autoload=yes`
201+ Then STDOUT should be:
202+ """
203+ Success: Updated autoload value for 'hello' option.
204+ """
205+
206+ When I run `wp option get-autoload hello`
207+ Then STDOUT should be:
208+ """
209+ yes
210+ """
211+
212+ When I run `wp option update hello world --autoload=off`
213+ Then STDOUT should be:
214+ """
215+ Success: Updated autoload value for 'hello' option.
216+ """
217+
218+ When I run `wp option get-autoload hello`
219+ Then STDOUT should be:
220+ """
221+ no
222+ """
223+
224+ When I run `wp option update hello world --autoload=on`
225+ Then STDOUT should be:
226+ """
227+ Success: Updated autoload value for 'hello' option.
228+ """
229+
230+ When I run `wp option get-autoload hello`
231+ Then STDOUT should be:
232+ """
233+ yes
234+ """
235+
236+ @require-wp-6.6
237+ Scenario: Update autoload value for custom option with an unchanged value
238+ Given a WP install
239+ And I run `wp option add hello world --autoload=on`
240+
241+ When I run `wp option update hello world --autoload=off`
242+ Then STDOUT should be:
243+ """
244+ Success: Updated autoload value for 'hello' option.
245+ """
246+
247+ When I run `wp option get-autoload hello`
248+ Then STDOUT should be:
249+ """
250+ off
251+ """
252+
253+ When I run `wp option update hello world --autoload=on`
254+ Then STDOUT should be:
255+ """
256+ Success: Updated autoload value for 'hello' option.
257+ """
258+
259+ When I run `wp option get-autoload hello`
260+ Then STDOUT should be:
261+ """
262+ on
263+ """
264+
265+ When I run `wp option update hello world --autoload=no`
266+ Then STDOUT should be:
267+ """
268+ Success: Updated autoload value for 'hello' option.
269+ """
270+
271+ When I run `wp option get-autoload hello`
272+ Then STDOUT should be:
273+ """
274+ off
275+ """
276+
277+ When I run `wp option update hello world --autoload=yes`
278+ Then STDOUT should be:
279+ """
280+ Success: Updated autoload value for 'hello' option.
281+ """
282+
283+ When I run `wp option get-autoload hello`
284+ Then STDOUT should be:
285+ """
286+ on
287+ """
288+
183289 @require-wp-4.2
184290 @less-than-wp-6.6
185291 Scenario: Managed autoloaded options
0 commit comments