@@ -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