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/image/editorImagick.php

    r60729 r60736  
    706706     *
    707707     * @ticket 62285
     708     *
     709     * Temporarily disabled until we can figure out why it fails on the Trixie based PHP container.
     710     * See https://core.trac.wordpress.org/ticket/63932.
     711     * @requires PHP < 8.3
    708712     */
    709713    public function test_image_max_bit_depth() {
     
    780784    public function test_resizes_are_small_for_16bit_images( $file ) {
    781785
     786        // Temporarily disabled. See https://core.trac.wordpress.org/ticket/63932.
     787        if ( DIR_TESTDATA . '/images/png-tests/test8.png' === $file ) {
     788            $version = Imagick::getVersion();
     789            if ( $version['versionNumber'] >= 0x700 ) {
     790                $this->markTestSkipped( 'ImageMagick 7 is unable to optimize grayscale images with 1-bit transparency.' );
     791            }
     792        }
     793
    782794        $temp_file = DIR_TESTDATA . '/images/test-temp.png';
    783795
     
    835847     */
    836848    public function test_png_color_type_is_preserved_after_resize( $file_path, $expected_color_type ) {
     849
     850        // Temporarily disabled. See https://core.trac.wordpress.org/ticket/63932.
     851        if ( DIR_TESTDATA . '/images/png-tests/test8.png' === $file_path ) {
     852            $version = Imagick::getVersion();
     853            if ( $version['versionNumber'] >= 0x700 ) {
     854                $this->markTestSkipped( 'ImageMagick 7 is unable to optimize grayscale images with 1-bit transparency.' );
     855            }
     856        }
    837857
    838858        $temp_file = DIR_TESTDATA . '/images/test-temp.png';
Note: See TracChangeset for help on using the changeset viewer.