Skip to content

Commit 44f88c7

Browse files
committed
Remove some now obsolete tests
No longer relevant because of PHP 7.2+ requirement
1 parent e40397b commit 44f88c7

2 files changed

Lines changed: 0 additions & 137 deletions

File tree

features/config-create.feature

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -227,56 +227,6 @@ Feature: Create a wp-config file
227227
define( 'AUTH_SALT',
228228
"""
229229
230-
@less-than-php-7.0
231-
Scenario: Configure with salts fetched from WordPress.org
232-
Given an empty directory
233-
And WP files
234-
235-
When I run `wp config create {CORE_CONFIG_SETTINGS}`
236-
Then the wp-config.php file should contain:
237-
"""
238-
define( 'AUTH_SALT',
239-
"""
240-
241-
Scenario: Define WPLANG when running WP < 4.0
242-
Given an empty directory
243-
And I run `wp core download --version=3.9 --force`
244-
245-
When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check`
246-
Then the wp-config.php file should contain:
247-
"""
248-
define( 'WPLANG', '' );
249-
"""
250-
251-
When I try `wp config create {CORE_CONFIG_SETTINGS}`
252-
Then the return code should be 1
253-
And STDERR should contain:
254-
"""
255-
Error: The 'wp-config.php' file already exists.
256-
"""
257-
258-
When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --locale=ja --force`
259-
Then the return code should be 0
260-
And STDOUT should contain:
261-
"""
262-
Success: Generated 'wp-config.php' file.
263-
"""
264-
And the wp-config.php file should contain:
265-
"""
266-
define( 'WPLANG', 'ja' );
267-
"""
268-
269-
When I run `wp config create {CORE_CONFIG_SETTINGS} --skip-check --config-file=wp-custom-config.php --locale=ja --force`
270-
Then the return code should be 0
271-
And STDOUT should contain:
272-
"""
273-
Success: Generated 'wp-custom-config.php' file.
274-
"""
275-
And the wp-custom-config.php file should contain:
276-
"""
277-
define( 'WPLANG', 'ja' );
278-
"""
279-
280230
Scenario: Values are properly escaped to avoid creating invalid config files
281231
Given an empty directory
282232
And WP files

features/config-shuffle-salts.feature

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)