@@ -265,90 +265,3 @@ Feature: Refresh the salts in the wp-config.php file
265265 """
266266 {NEW_KEY_ORIG}
267267 """
268-
269- @less-than-php-7.0
270- Scenario : Force adding missing salts to shuffle fails on PHP < 7.0
271- Given a WP install
272- When I run `wp config shuffle-salts`
273- Then STDOUT should contain:
274- """
275- Shuffled the salt keys.
276- """
277- And the wp-config.php file should contain:
278- """
279- define( 'AUTH_KEY'
280- """
281- And the wp-config.php file should contain:
282- """
283- define( 'LOGGED_IN_SALT'
284- """
285- And the wp-config.php file should not contain:
286- """
287- define( 'NEW_KEY'
288- """
289-
290- When I run `wp config get AUTH_KEY --type=constant`
291- Then save STDOUT as {AUTH_KEY_ORIG}
292- When I run `wp config get LOGGED_IN_SALT --type=constant`
293- Then save STDOUT as {LOGGED_IN_SALT_ORIG}
294-
295- When I try `wp config shuffle-salts AUTH_KEY NEW_KEY`
296- Then STDOUT should contain:
297- """
298- Shuffled 1 of 2 salts (1 skipped).
299- """
300- And STDERR should contain:
301- """
302- Warning: Could not shuffle the unknown key 'NEW_KEY'.
303- """
304- And the wp-config.php file should not contain:
305- """
306- {AUTH_KEY_ORIG}
307- """
308- And the wp-config.php file should contain:
309- """
310- {LOGGED_IN_SALT_ORIG}
311- """
312- And the wp-config.php file should not contain:
313- """
314- define( 'NEW_KEY'
315- """
316-
317- When I run `wp config get AUTH_KEY --type=constant`
318- Then save STDOUT as {AUTH_KEY_ORIG}
319-
320- When I try `wp config shuffle-salts AUTH_KEY NEW_KEY --force`
321- Then STDOUT should contain:
322- """
323- Shuffled 1 of 2 salts (1 skipped).
324- """
325- And STDERR should contain:
326- """
327- Warning: Could not add the key 'NEW_KEY' because 'random_int()' is not supported.
328- """
329- And the wp-config.php file should not contain:
330- """
331- {AUTH_KEY_ORIG}
332- """
333- And the wp-config.php file should contain:
334- """
335- {LOGGED_IN_SALT_ORIG}
336- """
337- And the wp-config.php file should not contain:
338- """
339- define( 'NEW_KEY'
340- """
341-
342- @less-than-php-7.0
343- Scenario : Shuffling salts duplicate warnings on PHP < 7.0
344- Given a WP install
345- When I try `wp config shuffle-salts WP_CACHE_KEY_SALT NONCE_SALT`
346- Then STDERR should contain:
347- """
348- Warning: Could not shuffle the unknown key 'WP_CACHE_KEY_SALT'.
349- """
350- And STDERR should not contain:
351- """
352- Warning: Could not shuffle the unknown key 'WP_CACHE_KEY_SALT'.
353- Warning: Could not shuffle the unknown key 'WP_CACHE_KEY_SALT'.
354- """
0 commit comments