You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run `WP_CLI_PACKAGES_DIR=. wp package is-installed wp-cli/restful`
50
54
Then the return code should be 0
51
55
And STDERR should be empty
52
56
And STDOUT should be empty
53
57
58
+
Scenario: Install a package updates the package index repository to be non-canonical
59
+
Given an empty directory
60
+
And a composer.json file:
61
+
"""
62
+
{
63
+
"repositories": {
64
+
"test" : {
65
+
"type": "path",
66
+
"url": "./dummy-package/"
67
+
},
68
+
"wp-cli": {
69
+
"type": "composer",
70
+
"url": "https://wp-cli.org/package-index/"
71
+
}
72
+
}
73
+
}
74
+
"""
75
+
And a dummy-package/composer.json file:
76
+
"""
77
+
{
78
+
"name": "wp-cli/restful",
79
+
"description": "This is a dummy package we will install instead of actually installing the real package. This prevents the test from hanging indefinitely for some reason, even though it passes. The 'name' must match a real package as it is checked against the package index."
80
+
}
81
+
"""
82
+
When I run `WP_CLI_PACKAGES_DIR=. wp package install wp-cli/restful`
83
+
Then STDOUT should contain:
84
+
"""
85
+
Success: Package installed
86
+
"""
87
+
And the composer.json file should contain:
88
+
"""
89
+
"canonical": false
90
+
"""
91
+
54
92
@require-php-5.6
55
93
Scenario: Install a package with 'wp-cli/wp-cli' as a dependency
0 commit comments