[wp-trac] [WordPress Trac] #63443: ZIP tests not checking potential clean directory
WordPress Trac
noreply at wordpress.org
Tue May 13 16:44:16 UTC 2025
#63443: ZIP tests not checking potential clean directory
--------------------------------+----------------------------------------
Reporter: SirLouen | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: External Libraries | Version:
Severity: trivial | Keywords: good-first-bug needs-patch
Focuses: tests |
--------------------------------+----------------------------------------
During some tests, completely out of the blue, I found that the tests
`test_should_apply_unzip_file_filters`
`test_should_apply_pre_unzip_file_filters`
in both `tests/phpunit/tests/filesystem/unzipFilePclzip.php`
and `tests/phpunit/tests/filesystem/unzipFileZiparchive.php`
Were failing
For some reason, if the tests happen to fail, they leave the `archive`
directory undeleted, with `root` as owner, and since it's not going to
handle it anymore future executions of `mkdir` are going to fail.
Solution: Build a test setup function to check existences and clean
directories before running the tests.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63443>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list