Skip to content

Commit 82bdf8b

Browse files
authored
Merge pull request #302 from Nikschavan/301-php56-tests
2 parents 69e9355 + 2798897 commit 82bdf8b

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

features/plugin-install.feature

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ Feature: Install WordPress plugins
33
Scenario: Branch names should be removed from Github projects
44
Given a WP install
55

6-
When I run `wp plugin install https://github.com/runcommand/one-time-login/archive/master.zip --activate`
6+
When I run `wp plugin install https://github.com/wp-cli-test/generic-example-plugin/archive/refs/heads/master.zip --activate`
77
Then STDOUT should contain:
88
"""
99
Downloading install
1010
"""
1111
And STDOUT should contain:
1212
"""
13-
package from https://github.com/runcommand/one-time-login/archive/master.zip
13+
package from https://github.com/wp-cli-test/generic-example-plugin/archive/refs/heads/master.zip
1414
"""
1515
And STDOUT should contain:
1616
"""
17-
Renamed Github-based project from 'one-time-login-master' to 'one-time-login'.
17+
Renamed Github-based project from 'generic-example-plugin-master' to 'generic-example-plugin'.
1818
"""
1919
And STDOUT should contain:
2020
"""
2121
Plugin installed successfully.
2222
"""
23-
And the wp-content/plugins/one-time-login directory should exist
24-
And the wp-content/plugins/one-time-login-master directory should not exist
23+
And the wp-content/plugins/generic-example-plugin directory should exist
24+
And the wp-content/plugins/generic-example-plugin-master directory should not exist
2525

26-
When I try `wp plugin install https://github.com/runcommand/one-time-login/archive/master.zip`
26+
When I try `wp plugin install https://github.com/wp-cli-test/generic-example-plugin/archive/refs/heads/master.zip`
2727
Then STDERR should contain:
2828
"""
2929
Warning: Destination folder already exists
@@ -32,17 +32,17 @@ Feature: Install WordPress plugins
3232
"""
3333
Error: No plugins installed.
3434
"""
35-
And the wp-content/plugins/one-time-login directory should exist
36-
And the wp-content/plugins/one-time-login-master directory should not exist
35+
And the wp-content/plugins/generic-example-plugin directory should exist
36+
And the wp-content/plugins/generic-example-plugin-master directory should not exist
3737
And the return code should be 1
3838

39-
When I run `wp plugin install https://github.com/runcommand/one-time-login/archive/master.zip --force`
39+
When I run `wp plugin install https://github.com/wp-cli-test/generic-example-plugin/archive/refs/heads/master.zip --force`
4040
Then STDOUT should contain:
4141
"""
4242
Plugin updated successfully.
4343
"""
44-
And the wp-content/plugins/one-time-login directory should exist
45-
And the wp-content/plugins/one-time-login-master directory should not exist
44+
And the wp-content/plugins/generic-example-plugin directory should exist
45+
And the wp-content/plugins/generic-example-plugin-master directory should not exist
4646

4747
# However if the plugin slug ('modern-framework') does not match the project name then it's downloaded to wrong directory.
4848
When I run `wp plugin install https://github.com/Miller-Media/modern-wordpress/archive/master.zip`
@@ -58,16 +58,16 @@ Feature: Install WordPress plugins
5858
Scenario: Don't attempt to rename ZIPs uploaded to GitHub's releases page
5959
Given a WP install
6060

61-
When I run `wp plugin install https://github.com/danielbachhuber/one-time-login/releases/download/v0.1.2/one-time-login.0.1.2.zip`
61+
When I run `wp plugin install https://github.com/wp-cli-test/generic-example-plugin/releases/download/v0.1.0/generic-example-plugin.0.1.0.zip`
6262
Then STDOUT should contain:
6363
"""
6464
Plugin installed successfully.
6565
"""
6666
And STDOUT should not contain:
6767
"""
68-
Renamed Github-based project from 'one-time-login.0.1.2' to 'one-time-login'.
68+
Renamed Github-based project from 'generic-example-plugin-0.1.0' to 'generic-example-plugin'.
6969
"""
70-
And the wp-content/plugins/one-time-login directory should exist
70+
And the wp-content/plugins/generic-example-plugin directory should exist
7171

7272
Scenario: Don't attempt to rename ZIPs coming from a GitHub raw source
7373
Given a WP install

0 commit comments

Comments
 (0)