Skip to content

Commit 1f1ca0c

Browse files
authored
Merge pull request #167 from wp-cli/fix-tests
Fix failing tests
2 parents d8d7d12 + 7d907d1 commit 1f1ca0c

File tree

1 file changed

+6
-78
lines changed

1 file changed

+6
-78
lines changed

features/language-core.feature

Lines changed: 6 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -220,78 +220,6 @@ Feature: Manage core translation files for a WordPress install
220220
"""
221221
And the return code should be 0
222222

223-
# This test downgrades to older WP version. PHP restriction is added to avoid warnings in latest versions.
224-
@less-than-php-7.0
225-
Scenario Outline: Core translation update
226-
Given an empty directory
227-
And WP files
228-
And a database
229-
And I run `wp core download --version=<original> --force`
230-
And wp-config.php
231-
And I run `wp core install --url='localhost:8001' --title='Test' --admin_user=wpcli --admin_email=admin@example.com --admin_password=1`
232-
233-
When I run `wp language core list --fields=language,status,update`
234-
Then STDOUT should be a table containing rows:
235-
| language | status | update |
236-
| ar | uninstalled | none |
237-
| en_CA | uninstalled | none |
238-
| en_US | active | none |
239-
| ja | uninstalled | none |
240-
241-
When I run `wp language core install en_CA ja`
242-
Then the wp-content/languages/admin-en_CA.po file should exist
243-
And the wp-content/languages/en_CA.po file should exist
244-
And the wp-content/languages/admin-ja.po file should exist
245-
And the wp-content/languages/ja.po file should exist
246-
And STDOUT should contain:
247-
"""
248-
Success: Installed 2 of 2 languages.
249-
"""
250-
And STDERR should be empty
251-
252-
Given I try `wp core download --version=<update> --force`
253-
Then the return code should be 0
254-
And I run `wp core update-db`
255-
256-
When I run `wp language core list --fields=language,status,update`
257-
Then STDOUT should be a table containing rows:
258-
| language | status | update |
259-
| ar | uninstalled | none |
260-
| en_CA | installed | available |
261-
| en_US | active | none |
262-
| ja | installed | available |
263-
264-
When I run `wp language core update --dry-run`
265-
Then STDOUT should contain:
266-
"""
267-
Found 2 translation updates that would be processed
268-
"""
269-
And STDOUT should contain:
270-
"""
271-
Core
272-
"""
273-
And STDOUT should contain:
274-
"""
275-
WordPress
276-
"""
277-
And STDOUT should contain:
278-
"""
279-
<update>
280-
"""
281-
And STDOUT should contain:
282-
"""
283-
English (Canada)
284-
"""
285-
And STDOUT should contain:
286-
"""
287-
Japanese
288-
"""
289-
290-
Examples:
291-
| original | update |
292-
| 4.8 | 4.9 |
293-
| 4.0.1 | 4.2 |
294-
295223
@require-wp-6.0 @require-php-7.2
296224
Scenario Outline: Core translation update in newer versions
297225
Given an empty directory
@@ -360,8 +288,8 @@ Feature: Manage core translation files for a WordPress install
360288

361289
Examples:
362290
| original | update |
363-
| 6.0 | 6.1 |
364-
| 6.1.1 | 6.2 |
291+
| 6.5 | 6.6 |
292+
| 6.6.1 | 6.7 |
365293

366294
@require-wp-4.0
367295
Scenario: Don't allow active language to be uninstalled
@@ -378,20 +306,20 @@ Feature: Manage core translation files for a WordPress install
378306
And STDOUT should be empty
379307
And the return code should be 0
380308

381-
# This test downgrades to WordPress 5.4.1, but the SQLite plugin requires 6.0+
382-
@require-wp-4.0 @require-mysql
309+
# This test downgrades to WordPress 5.6.14, but the SQLite plugin requires 6.0+
310+
@require-wp-5.7 @require-mysql
383311
Scenario: Ensure correct language is installed for WP version
384312
Given a WP install
385313
And I try `wp theme install twentytwentyone`
386314
And I run `wp theme activate twentytwentyone`
387315
And an empty cache
388-
And I run `wp core download --version=4.5.3 --force`
316+
And I run `wp core download --version=5.6.14 --force`
389317

390318
# PHP 8.2+ will show a warning for old WordPress core version.
391319
When I try `wp language core install nl_NL`
392320
Then STDOUT should contain:
393321
"""
394-
Downloading translation from https://downloads.wordpress.org/translation/core/4.5.3
322+
Downloading translation from https://downloads.wordpress.org/translation/core/5.6.14
395323
"""
396324
And STDOUT should contain:
397325
"""

0 commit comments

Comments
 (0)