Skip to content

Commit cd1e49a

Browse files
authored
Merge pull request #355 from wp-cli/fix/tests
Fix tests for Hello Dolly
2 parents 28abef8 + a11cc14 commit cd1e49a

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

features/scaffold-plugin-tests.feature

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,12 +209,20 @@ Feature: Scaffold plugin unit tests
209209

210210
Scenario: Scaffold plugin tests with invalid slug
211211
Given a WP install
212-
Then the {RUN_DIR}/wp-content/plugins/hello.php file should exist
212+
And a wp-content/plugins/foo.php file:
213+
"""
214+
<?php
215+
/**
216+
* Plugin Name: Foo
217+
* Description: Foo plugin
218+
*/
219+
"""
220+
Then the {RUN_DIR}/wp-content/plugins/foo.php file should exist
213221

214-
When I try `wp scaffold plugin-tests hello`
222+
When I try `wp scaffold plugin-tests foo`
215223
Then STDERR should be:
216224
"""
217-
Error: Invalid plugin slug specified. No such target directory '{RUN_DIR}/wp-content/plugins/hello'.
225+
Error: Invalid plugin slug specified. No such target directory '{RUN_DIR}/wp-content/plugins/foo'.
218226
"""
219227
And the return code should be 1
220228

0 commit comments

Comments
 (0)