Opened 17 months ago
Closed 17 months ago
#59394 closed defect (bug) (fixed)
Fix failing unit tests
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Build/Test Tools | Keywords: | has-patch has-unit-tests commit fixed-major |
Focuses: | Cc: |
Description (last modified by )
PHPUnit x.y.z was released earlier today with a change that addresses a breaking change upstream from PHP.
This causes two failures in the Core test suite:
There were 2 failures: 1) Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_true_if_open_basedir_is_set_and_path_is_allowed Test was run in child process and ended unexpectedly phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118 2) Tests_Admin_WpAutomaticUpdater::test_is_allowed_dir_should_return_false_if_open_basedir_is_set_and_path_is_not_allowed Test was run in child process and ended unexpectedly phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97 /var/www/vendor/bin/phpunit:118
Three versions of PHPUnit were released. Any changes made to fix these failing tests will need to be backported to any branch that uses:
Props @mukesh27 for the original report.
Change History (12)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
17 months ago
This ticket was mentioned in PR #5249 on WordPress/wordpress-develop by @costdev.
17 months ago
#3
- Keywords has-patch has-unit-tests added; needs-patch removed
#6
@
17 months ago
- Keywords commit added
I tested this on Linux and @SergeyBiryukov tested this on Windows. Tests were successful.
PR 5249 has been reviewed and approved.
Adding for commit
and prepping this now.
Note: See
TracTickets for help on using
tickets.
In PHPUnit 9.6.13, the child processes used for process isolation now use temporary files to communicate their result to the parent process. This caused a failure in some tests that set the
open_basedir
PHP directive.This adds
sys_get_temp_dir()
to theopen_basedir
value set by the tests.References: