Skip to content

Commit 066ce3f

Browse files
committed
add test for other valet new options
references #7
1 parent 6a98e5a commit 066ce3f

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

features/valet-new.feature

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,31 @@ Feature: Create a new install.
2020
Success: {PROJECT} ready! http://{PROJECT}.dev
2121
"""
2222

23+
Scenario: It accepts options for configuring the new install.
24+
Given an empty directory
25+
And a random project name as {PROJECT}
26+
And a random string as {ADMIN}
27+
28+
When I run `wp valet new {PROJECT} --admin_user={ADMIN} --admin_email=hello@{PROJECT}.dev --version=4.5 --dbname=wp_cli_test --dbprefix={ADMIN}_ --dbuser=wp_cli_test --dbpass=password1`
29+
Then the wp_cli_test database should exist
30+
31+
When I run `wp db tables --path={PROJECT}`
32+
Then STDOUT should contain:
33+
"""
34+
{ADMIN}_users
35+
"""
36+
37+
When I run `wp core version --path={PROJECT}`
38+
Then STDOUT should be:
39+
"""
40+
4.5
41+
"""
42+
43+
When I run `wp user list --fields=ID,user_login,user_email --path={PROJECT}`
44+
Then STDOUT should be a table containing rows:
45+
| ID | user_login | user_email |
46+
| 1 | {ADMIN} | hello@{PROJECT}.dev |
47+
2348
Scenario: It can create a new WordPress install using sqlite for the database.
2449
Given an empty directory
2550
And a random project name as {PROJECT}

0 commit comments

Comments
 (0)