Make WordPress Core


Ignore:
Timestamp:
09/13/2025 12:14:39 PM (3 months ago)
Author:
johnbillion
Message:

Media: Temporarily disable failing tests when Imagick 7 is in use, pending further investigation.

The updated PHP 8.4 and 8.3 containers are running Imagick 7 which is producing some test failures for AVIFs and PNGs with 1-bit transparency. This requires further investigation, possibly accompanied by more comprehensive testing across Imagick versions, so these tests are disabled for now.

Additional missing assertions have also been added which ensure an unexpected WP_Error instance correctly fails the test and is not passed to an image processing function.

Props johnbillion, siliconforks, desrosj, jorbin.

See #63932

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/media.php

    r60641 r60736  
    54615461        // Sub-sizes: for each size, the JPEGs should be smaller than the WebP.
    54625462        $sizes_to_compare = array_intersect_key( $jpeg_sizes['sizes'], $webp_sizes['sizes'] );
     5463
     5464        $this->assertNotEmpty( $sizes_to_compare );
     5465
    54635466        foreach ( $sizes_to_compare as $size => $size_data ) {
    54645467            $this->assertLessThan( $webp_sizes['sizes'][ $size ]['filesize'], $jpeg_sizes['sizes'][ $size ]['filesize'] );
     
    54705473     *
    54715474     * @ticket 61614
     5475     *
     5476     * Temporarily disabled until we can figure out why it fails on the Trixie based PHP container.
     5477     * See https://core.trac.wordpress.org/ticket/63932.
     5478     * @requires PHP < 8.3
    54725479     */
    54735480    public function test_quality_with_avif_conversion_file_sizes() {
     
    55035510        // Sub-sizes: for each size, the AVIF should be smaller than the JPEG.
    55045511        $sizes_to_compare = array_intersect_key( $avif_sizes['sizes'], $smaller_avif_sizes['sizes'] );
     5512
     5513        $this->assertNotEmpty( $sizes_to_compare );
    55055514
    55065515        foreach ( $sizes_to_compare as $size => $size_data ) {
Note: See TracChangeset for help on using the changeset viewer.