Skip to content

Commit e3b3fb9

Browse files
schlesseraclaude
andauthored
Run setup commands in a single process in tests (#153)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 683551b commit e3b3fb9

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

‎composer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"wp-cli/entity-command": "^1.3 || ^2 || ^3",
1919
"wp-cli/eval-command": "^2.0 || ^3",
2020
"wp-cli/server-command": "^2.0 || ^3",
21-
"wp-cli/wp-cli-tests": "^5"
21+
"wp-cli/wp-cli-tests": "^5.4.0"
2222
},
2323
"config": {
2424
"process-timeout": 7200,

‎features/cron-event.feature‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,11 @@ Feature: Manage WP Cron events
7474
Success: Unscheduled 1 event for hook 'wp_cli_test_event_1'.
7575
"""
7676

77-
When I run `wp cron event schedule wp_cli_test_event_2 now hourly`
78-
And I run `wp cron event schedule wp_cli_test_event_2 '+1 hour' hourly`
79-
And I try `wp cron event unschedule wp_cli_test_event_2`
77+
Given these setup commands:
78+
| command |
79+
| wp cron event schedule wp_cli_test_event_2 now hourly |
80+
| wp cron event schedule wp_cli_test_event_2 '+1 hour' hourly |
81+
When I try `wp cron event unschedule wp_cli_test_event_2`
8082
Then STDOUT should contain:
8183
"""
8284
Success: Unscheduled 2 events for hook 'wp_cli_test_event_2'.

0 commit comments

Comments
 (0)