Opened 3 years ago
Closed 3 years ago
#54612 closed defect (bug) (fixed)
Disable WP_CRON when installing PHPUnit tests
Reported by: | Chouby | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.9 | Priority: | normal |
Severity: | normal | Version: | 3.7 |
Component: | Build/Test Tools | Keywords: | has-patch |
Focuses: | Cc: |
Description
While running PHPunit tests for one of my plugins with PHP 8.1, I noticed deprecation notices in the Requests library during the WordPress installation process. These notices reveal in fact that an http request is always fired by a cron task during the WordPress installation.
In bootstrap.php, we can find these lines:
/*
* Cron tries to make an HTTP request to the site, which always fails,
* because tests are run in CLI mode only.
*/
define( 'DISABLE_WP_CRON', true );
However the constant is not passed to the install.php
script.
I propose to add this constant in this script too.
Attachments (1)
Change History (4)
Note: See
TracTickets for help on using
tickets.
In 52359: