diff --git a/composer.json b/composer.json index 9cd4b9784..6ffa2270c 100644 --- a/composer.json +++ b/composer.json @@ -16,11 +16,15 @@ }, "require-dev": { "wp-cli/entity-command": "^1.3 || ^2", + "wp-cli/server-command": "^2.0", "wp-cli/wp-cli-tests": "^3.1" }, "config": { "process-timeout": 7200, - "sort-packages": true + "sort-packages": true, + "allow-plugins": { + "dealerdirect/phpcodesniffer-composer-installer": true + } }, "extra": { "branch-alias": { diff --git a/features/cron.feature b/features/cron.feature index 0652d1ea2..e605bcfdd 100644 --- a/features/cron.feature +++ b/features/cron.feature @@ -2,7 +2,7 @@ Feature: Manage WP-Cron events and schedules Background: Given a WP install - And I run `wp config set DISABLE_WP_CRON false --raw --type=constant --anchor='// ** MySQL settings - You can get this info from your web host ** //'` + And I run `wp config set DISABLE_WP_CRON false --raw --type=constant --anchor="if ( ! defined( 'DISABLE_WP_CRON' ) )"` Scenario: Scheduling and then deleting an event When I run `wp cron event schedule wp_cli_test_event_1 '+1 hour 5 minutes' --0=banana` @@ -190,11 +190,38 @@ Feature: Manage WP-Cron events and schedules | hourly | 3600 | Scenario: Testing WP-Cron - When I try `wp cron test` - Then STDERR should not contain: + Given a php.ini file: + """ + error_log = {RUN_DIR}/server.log + log_errors = on + """ + And I launch in the background `wp server --host=localhost --port=8080 --config=php.ini` + And a wp-content/mu-plugins/set_cron_site_url.php file: + """ +