Opened 3 years ago
Closed 3 years ago
#59394 closed defect (bug) (fixed)
Fix failing unit tests
| Reported by: | desrosj | Owned by: | costdev |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.4 |
| Component: | Build/Test Tools | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit fixed-major |
| Cc: | Focuses: |
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.
3 years ago
This ticket was mentioned in PR #5249 on WordPress/wordpress-develop by @costdev.
3 years ago
#3
- Keywords has-patch has-unit-tests added; needs-patch removed
#6
@
3 years 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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_basedirPHP directive.This adds
sys_get_temp_dir()to theopen_basedirvalue set by the tests.References: