Make WordPress Core

Changeset 48341


Ignore:
Timestamp:
07/06/2020 06:20:32 PM (5 years ago)
Author:
SergeyBiryukov
Message:

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

See #50573.

File:
1 edited

Legend:

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

    r48338 r48341  
    424424        copy( $orig_file, $test_file );
    425425
    426         $this->assertNotWPError( wp_get_image_editor( $test_file ) );
     426        $editor = wp_get_image_editor( $test_file );
     427        if ( is_wp_error( $editor ) ) {
     428            $this->markTestSkipped( $editor->get_error_message() );
     429        }
    427430
    428431        $attachment_id = $this->factory->attachment->create_object(
     
    491494        copy( $orig_file, $test_file );
    492495
    493         $this->assertNotWPError( wp_get_image_editor( $test_file ) );
     496        $editor = wp_get_image_editor( $test_file );
     497        if ( is_wp_error( $editor ) ) {
     498            $this->markTestSkipped( $editor->get_error_message() );
     499        }
    494500
    495501        $attachment_id = $this->factory->attachment->create_object(
     
    553559        copy( $orig_file, $test_file );
    554560
    555         $this->assertNotWPError( wp_get_image_editor( $test_file ) );
     561        $editor = wp_get_image_editor( $test_file );
     562        if ( is_wp_error( $editor ) ) {
     563            $this->markTestSkipped( $editor->get_error_message() );
     564        }
    556565
    557566        $attachment_id = $this->factory->attachment->create_object(
     
    615624        copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
    616625
    617         $this->assertNotWPError( wp_get_image_editor( $pdf_path ) );
     626        $editor = wp_get_image_editor( $pdf_path );
     627        if ( is_wp_error( $editor ) ) {
     628            $this->markTestSkipped( $editor->get_error_message() );
     629        }
    618630
    619631        $attachment_id = $this->factory->attachment->create_object(
Note: See TracChangeset for help on using the changeset viewer.