WordPress.org

Make WordPress Core

Changeset 48489


Ignore:
Timestamp:
07/14/2020 09:51:43 PM (15 months ago)
Author:
SergeyBiryukov
Message:

Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.

Merges [48338], [48341] to the 4.7 branch.

See #50573.

Location:
branches/4.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.7

  • branches/4.7/tests/phpunit/tests/image/functions.php

    r40133 r48489  
    371371        $test_file = '/tmp/wordpress-gsoc-flyer.pdf';
    372372        copy( $orig_file, $test_file );
     373
     374        $editor = wp_get_image_editor( $test_file );
     375        if ( is_wp_error( $editor ) ) {
     376            $this->markTestSkipped( $editor->get_error_message() );
     377        }
    373378
    374379        $attachment_id = $this->factory->attachment->create_object( $test_file, 0, array(
     
    428433        copy( $orig_file, $test_file );
    429434
     435        $editor = wp_get_image_editor( $test_file );
     436        if ( is_wp_error( $editor ) ) {
     437            $this->markTestSkipped( $editor->get_error_message() );
     438        }
     439
    430440        $attachment_id = $this->factory->attachment->create_object( $test_file, 0, array(
    431441            'post_mime_type' => 'application/pdf',
     
    482492        $pdf_path = '/tmp/test.pdf';
    483493        copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
     494
     495        $editor = wp_get_image_editor( $test_file );
     496        if ( is_wp_error( $editor ) ) {
     497            $this->markTestSkipped( $editor->get_error_message() );
     498        }
    484499
    485500        $attachment_id = $this->factory->attachment->create_object( $pdf_path, 0, array(
Note: See TracChangeset for help on using the changeset viewer.