[wp-trac] [WordPress Trac] #63532: Unit Testing: Checking if images already exists before starting tests
WordPress Trac
noreply at wordpress.org
Thu Jun 5 09:23:41 UTC 2025
#63532: Unit Testing: Checking if images already exists before starting tests
-------------------------------------------------+-------------------------
Reporter: SirLouen | Owner: (none)
Type: defect (bug) | Status: closed
Priority: normal | Milestone: Awaiting
| Review
Component: Media | Version:
Severity: normal | Resolution: wontfix
Keywords: has-test-info has-patch has-unit- | Focuses: tests
tests |
-------------------------------------------------+-------------------------
Changes (by riccardodicurti):
* status: new => closed
* resolution: => wontfix
Comment:
= Test Report =
'''Patch tested:''' [https://github.com/WordPress/wordpress-
develop/pull/8899 PR 8899]
'''Ticket:''' #63532
== Environment ==
* WordPress: 6.9-alpha-60093-src
* PHP: 8.2.25 64bit
* OS: macOS
* Server: Docker (default wordpress-develop environment)
* Database: MySQL
* Theme: Twenty Twenty-Five 1.2
* Test command: `npm run test:php -- --group media`
== Results ==
✔️ Without manually creating the file `test-image-large.jpg` in the
uploads directory, all media tests pass.
❌ If the file `wp-content/uploads/2025/06/test-image-large.jpg` exists
prior to running the tests (e.g., created via `touch`), the test suite
reports multiple failures and notices, such as:
* `Notice: exif_imagetype(): Error reading from ...`
* `Undefined array key "sizes"`
* Test failures due to unexpected file names like `test-image-
large-1.jpg`
Perhaps it's worth reviewing the patch again to ensure the tests work
correctly in all environments, including when conflicting files already
exist.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63532#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list