@@ -37,7 +37,7 @@ Feature: Scaffold WP-CLI commands
3737 "wp-cli/wp-cli": "^2.5"
3838 },
3939 """
40- And the {PACKAGE_PATH}/local/wp-cli/foo/command.php file should exist
40+ And the {PACKAGE_PATH}/local/wp-cli/foo/hello-world- command.php file should exist
4141 And the {PACKAGE_PATH}/local/wp-cli/foo/CONTRIBUTING.md file should exist
4242 And the {PACKAGE_PATH}/local/wp-cli/foo/CONTRIBUTING.md file should contain:
4343 """
@@ -48,17 +48,24 @@ Feature: Scaffold WP-CLI commands
4848 And the {PACKAGE_PATH}/local/wp-cli/foo/.github/PULL_REQUEST_TEMPLATE file should exist
4949 And the {PACKAGE_PATH}/local/wp-cli/foo/.github/ISSUE_TEMPLATE file should exist
5050
51- When I run `wp --require={PACKAGE_PATH}/local/wp-cli/foo/command.php hello-world`
51+ When I run `wp hello-world`
52+ Then STDOUT should be:
53+ """
54+ Success: Hello World!
55+ """
56+
57+ When I run `composer -q -n --working-dir={PACKAGE_PATH}/local/wp-cli/foo/ install`
58+ And I run `wp --require={PACKAGE_PATH}/local/wp-cli/foo/hello-world-command.php hello-world`
5259 Then STDOUT should be:
5360 """
54- Success: Hello world.
61+ Success: Hello World!
5562 """
5663
5764 When I run `cat {PACKAGE_PATH}/local/wp-cli/foo/wp-cli.yml`
5865 Then STDOUT should contain:
5966 """
6067 require:
61- - command.php
68+ - hello-world- command.php
6269 """
6370
6471 When I run `cat {PACKAGE_PATH}/local/wp-cli/foo/.gitignore`
@@ -91,7 +98,7 @@ Feature: Scaffold WP-CLI commands
9198 When I run `wp hello-world`
9299 Then STDOUT should be:
93100 """
94- Success: Hello world.
101+ Success: Hello World!
95102 """
96103
97104 When I run `wp package uninstall wp-cli/without-require`
@@ -121,14 +128,15 @@ Feature: Scaffold WP-CLI commands
121128 And the custom-directory/.gitignore file should exist
122129 And the custom-directory/.editorconfig file should exist
123130 And the custom-directory/composer.json file should exist
124- And the custom-directory/command.php file should exist
131+ And the custom-directory/hello-world- command.php file should exist
125132 And the custom-directory/wp-cli.yml file should exist
126133 And the custom-directory/.travis.yml file should not exist
127134
128- When I run `wp --require=custom-directory/command.php hello-world`
135+ When I run `composer -q -n --working-dir=custom-directory/ install`
136+ And I run `wp --require=custom-directory/hello-world-command.php hello-world`
129137 Then STDOUT should be:
130138 """
131- Success: Hello world.
139+ Success: Hello World!
132140 """
133141 When I run `wp package uninstall wp-cli/custom-directory`
134142 Then STDOUT should contain:
@@ -148,6 +156,7 @@ Feature: Scaffold WP-CLI commands
148156 s
149157 s
150158 s
159+ s
151160 """
152161
153162 When I run `wp scaffold package wp-cli/same-package --skip-tests --skip-github`
@@ -187,14 +196,15 @@ Feature: Scaffold WP-CLI commands
187196 And the {PACKAGE_PATH}/local/wp-cli/with-tests/.gitignore file should exist
188197 And the {PACKAGE_PATH}/local/wp-cli/with-tests/.editorconfig file should exist
189198 And the {PACKAGE_PATH}/local/wp-cli/with-tests/composer.json file should exist
190- And the {PACKAGE_PATH}/local/wp-cli/with-tests/command.php file should exist
199+ And the {PACKAGE_PATH}/local/wp-cli/with-tests/hello-world- command.php file should exist
191200 And the {PACKAGE_PATH}/local/wp-cli/with-tests/wp-cli.yml file should exist
192201 And the {PACKAGE_PATH}/local/wp-cli/with-tests/.travis.yml file should exist
193202
194- When I run `wp --require={PACKAGE_PATH}/local/wp-cli/with-tests/command.php hello-world`
203+ When I run `composer -q -n --working-dir={PACKAGE_PATH}/local/wp-cli/with-tests/ install`
204+ And I run `wp --require={PACKAGE_PATH}/local/wp-cli/with-tests/hello-world-command.php hello-world`
195205 Then STDOUT should be:
196206 """
197- Success: Hello world.
207+ Success: Hello World!
198208 """
199209 When I run `wp package uninstall wp-cli/with-tests`
200210 Then STDOUT should contain:
0 commit comments