Make WordPress Core


Ignore:
Timestamp:
07/14/2020 09:31:50 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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

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

See #50573.

Location:
branches/5.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.3

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

    r46459 r48483  
    424424        copy( $orig_file, $test_file );
    425425
     426        $editor = wp_get_image_editor( $test_file );
     427        if ( is_wp_error( $editor ) ) {
     428            $this->markTestSkipped( $editor->get_error_message() );
     429        }
     430
    426431        $attachment_id = $this->factory->attachment->create_object(
    427432            $test_file,
     
    489494        copy( $orig_file, $test_file );
    490495
     496        $editor = wp_get_image_editor( $test_file );
     497        if ( is_wp_error( $editor ) ) {
     498            $this->markTestSkipped( $editor->get_error_message() );
     499        }
     500
    491501        $attachment_id = $this->factory->attachment->create_object(
    492502            $test_file,
     
    549559        copy( $orig_file, $test_file );
    550560
     561        $editor = wp_get_image_editor( $test_file );
     562        if ( is_wp_error( $editor ) ) {
     563            $this->markTestSkipped( $editor->get_error_message() );
     564        }
     565
    551566        $attachment_id = $this->factory->attachment->create_object(
    552567            $test_file,
     
    608623        $pdf_path = '/tmp/test.pdf';
    609624        copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
     625
     626        $editor = wp_get_image_editor( $pdf_path );
     627        if ( is_wp_error( $editor ) ) {
     628            $this->markTestSkipped( $editor->get_error_message() );
     629        }
    610630
    611631        $attachment_id = $this->factory->attachment->create_object(
Note: See TracChangeset for help on using the changeset viewer.