WordPress.org

Make WordPress Core

Changeset 48487


Ignore:
Timestamp:
07/14/2020 09:47:31 PM (2 months ago)
Author:
SergeyBiryukov
Message:

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

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

See #50573.

Location:
branches/4.9
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.9

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

    r42813 r48487  
    372372        copy( $orig_file, $test_file );
    373373
     374        $editor = wp_get_image_editor( $test_file );
     375        if ( is_wp_error( $editor ) ) {
     376            $this->markTestSkipped( $editor->get_error_message() );
     377        }
     378
    374379        $attachment_id = $this->factory->attachment->create_object( $test_file, 0, array(
    375380            'post_mime_type' => 'application/pdf',
     
    433438        copy( $orig_file, $test_file );
    434439
     440        $editor = wp_get_image_editor( $test_file );
     441        if ( is_wp_error( $editor ) ) {
     442            $this->markTestSkipped( $editor->get_error_message() );
     443        }
     444
    435445        $attachment_id = $this->factory->attachment->create_object(
    436446            $test_file, 0, array(
     
    491501        copy( $orig_file, $test_file );
    492502
     503        $editor = wp_get_image_editor( $test_file );
     504        if ( is_wp_error( $editor ) ) {
     505            $this->markTestSkipped( $editor->get_error_message() );
     506        }
     507
    493508        $attachment_id = $this->factory->attachment->create_object( $test_file, 0, array(
    494509            'post_mime_type' => 'application/pdf',
     
    545560        $pdf_path = '/tmp/test.pdf';
    546561        copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
     562
     563        $editor = wp_get_image_editor( $test_file );
     564        if ( is_wp_error( $editor ) ) {
     565            $this->markTestSkipped( $editor->get_error_message() );
     566        }
    547567
    548568        $attachment_id = $this->factory->attachment->create_object( $pdf_path, 0, array(
Note: See TracChangeset for help on using the changeset viewer.