Skip to content

Commit aa2ae20

Browse files
authored
Merge pull request #204 from wp-cli/fix/tests
Fix broken tests
2 parents e556954 + 7d7a06d commit aa2ae20

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

features/check-core-update.feature

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,9 @@ Feature: Check whether WordPress is up to date
5959
Given a WP install
6060
And I run `wp theme delete --all --force`
6161
And I run `wp theme install twentytwelve --activate`
62-
And I run `wp core download --version=4.1.30 --force`
62+
And I run `wp core download --version=5.9.10 --force`
6363

64-
# This version of WP throws a PHP notice.
65-
When I try `wp core update --minor`
64+
When I run `wp core update --minor`
6665
Then STDOUT should contain:
6766
"""
6867
Success: WordPress updated successfully.

features/check-plugin-status.feature

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@ Feature: Check the status of a plugin
1818

1919
Scenario: Basic usage
2020
Given a WP install
21+
And I run `wp plugin install https://github.com/wp-cli/sample-plugin/archive/refs/heads/master.zip`
2122
And a config.yml file:
2223
"""
2324
plugin-akismet-active:
2425
class: WP_CLI\Doctor\Check\Plugin_Status
2526
options:
2627
name: akismet
2728
status: active
28-
plugin-hello-uninstalled:
29+
plugin-sample-plugin-uninstalled:
2930
class: WP_CLI\Doctor\Check\Plugin_Status
3031
options:
31-
name: hello
32+
name: sample-plugin
3233
status: uninstalled
3334
"""
3435

3536
When I try `wp doctor check --all --config=config.yml`
3637
Then STDOUT should be a table containing rows:
37-
| name | status | message |
38-
| plugin-akismet-active | error | Plugin 'akismet' is 'inactive' but expected to be 'active'. |
39-
| plugin-hello-uninstalled | error | Plugin 'hello' is 'inactive' but expected to be 'uninstalled'. |
38+
| name | status | message |
39+
| plugin-akismet-active | error | Plugin 'akismet' is 'inactive' but expected to be 'active'. |
40+
| plugin-sample-plugin-uninstalled | error | Plugin 'sample-plugin' is 'inactive' but expected to be 'uninstalled'. |
4041
And STDERR should contain:
4142
"""
4243
Error: 2 checks report 'error'.
@@ -48,23 +49,23 @@ Feature: Check the status of a plugin
4849

4950
When I try `wp doctor check --all --config=config.yml`
5051
Then STDOUT should be a table containing rows:
51-
| name | status | message |
52-
| plugin-akismet-active | success | Plugin 'akismet' is 'active' as expected. |
53-
| plugin-hello-uninstalled | error | Plugin 'hello' is 'inactive' but expected to be 'uninstalled'. |
52+
| name | status | message |
53+
| plugin-akismet-active | success | Plugin 'akismet' is 'active' as expected. |
54+
| plugin-sample-plugin-uninstalled | error | Plugin 'sample-plugin' is 'inactive' but expected to be 'uninstalled'. |
5455
And STDERR should contain:
5556
"""
5657
Error: 1 check reports 'error'.
5758
"""
5859
And the return code should be 1
5960

60-
When I run `wp plugin delete hello`
61+
When I run `wp plugin delete sample-plugin`
6162
Then STDOUT should not be empty
6263

6364
When I run `wp doctor check --all --config=config.yml`
6465
Then STDOUT should be a table containing rows:
65-
| name | status | message |
66-
| plugin-akismet-active | success | Plugin 'akismet' is 'active' as expected. |
67-
| plugin-hello-uninstalled | success | Plugin 'hello' is 'uninstalled' as expected. |
66+
| name | status | message |
67+
| plugin-akismet-active | success | Plugin 'akismet' is 'active' as expected. |
68+
| plugin-sample-plugin-uninstalled | success | Plugin 'sample-plugin' is 'uninstalled' as expected. |
6869

6970
Scenario: Invalid status registered
7071
Given a WP install

0 commit comments

Comments
 (0)