Make WordPress Core

Changeset 60030


Ignore:
Timestamp:
03/17/2025 05:26:41 PM (9 months ago)
Author:
adamsilverstein
Message:

Media: fix potentially failing Imagick PDF alpha channel test.

Only test PDF alpha functionality when supported by the server.

Props: adamsilverstein, swissspidy, antpb, sippis.
Fixes #60798.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/image/editorImagick.php

    r59589 r60030  
    657657        }
    658658
     659        $version = Imagick::getVersion();
     660        if ( $version['versionNumber'] < 0x675 ) {
     661            $this->markTestSkipped( 'The version of ImageMagick does not support removing alpha channels from PDFs.' );
     662        }
     663
    659664        $test_file     = DIR_TESTDATA . '/images/test-alpha.pdf';
    660665        $attachment_id = $this->factory->attachment->create_upload_object( $test_file );
Note: See TracChangeset for help on using the changeset viewer.