New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure WP Cron is enabled for cron tests #36

Merged
merged 2 commits into from Nov 24, 2018

Conversation

2 participants
@ocean90
Copy link
Contributor

ocean90 commented Nov 20, 2018

Since wp-cli/wp-cli-tests#28 WP Cron is disabled by default for Behat tests.

@schlessera

This comment has been minimized.

Copy link
Member

schlessera commented Nov 20, 2018

@ocean90 I want to first look into overriding this behavior for the cron command so that we don't need to adapt the test instead, and I have a good idea on how to achieve that.

In the PR I did, you can see that it precedes the default value with a if ( ! defined( 'DISABLE_WP_CRON' ) { [...] }. So it would just be a matter of doing a define( 'DISABLE_WP_CRON', false ); in the correct location in this package.

@ocean90

This comment has been minimized.

Copy link
Contributor

ocean90 commented Nov 23, 2018

@schlessera See 6a6ba3d, very hacky, but it works. 🙈

@schlessera

This comment has been minimized.

Copy link
Member

schlessera commented Nov 24, 2018

Good enough for tests! ¯\_(ツ)_/¯

@schlessera schlessera added this to the 2.0.1 milestone Nov 24, 2018

@schlessera schlessera merged commit 1eadbe6 into wp-cli:master Nov 24, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@schlessera schlessera changed the title Update expected result of 'cron test' command Make sure WP Cron is enabled for cron tests Nov 24, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment