Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
See #50573. git-svn-id: https://develop.svn.wordpress.org/trunk@48341 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0fa6c2190a
commit
708e6de8ea
@ -423,7 +423,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = '/tmp/wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $test_file );
|
||||
|
||||
$this->assertNotWPError( wp_get_image_editor( $test_file ) );
|
||||
$editor = wp_get_image_editor( $test_file );
|
||||
if ( is_wp_error( $editor ) ) {
|
||||
$this->markTestSkipped( $editor->get_error_message() );
|
||||
}
|
||||
|
||||
$attachment_id = $this->factory->attachment->create_object(
|
||||
$test_file,
|
||||
@ -490,7 +493,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $test_file );
|
||||
|
||||
$this->assertNotWPError( wp_get_image_editor( $test_file ) );
|
||||
$editor = wp_get_image_editor( $test_file );
|
||||
if ( is_wp_error( $editor ) ) {
|
||||
$this->markTestSkipped( $editor->get_error_message() );
|
||||
}
|
||||
|
||||
$attachment_id = $this->factory->attachment->create_object(
|
||||
$test_file,
|
||||
@ -552,7 +558,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = '/tmp/wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $test_file );
|
||||
|
||||
$this->assertNotWPError( wp_get_image_editor( $test_file ) );
|
||||
$editor = wp_get_image_editor( $test_file );
|
||||
if ( is_wp_error( $editor ) ) {
|
||||
$this->markTestSkipped( $editor->get_error_message() );
|
||||
}
|
||||
|
||||
$attachment_id = $this->factory->attachment->create_object(
|
||||
$test_file,
|
||||
@ -614,7 +623,10 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$pdf_path = '/tmp/test.pdf';
|
||||
copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
|
||||
|
||||
$this->assertNotWPError( wp_get_image_editor( $pdf_path ) );
|
||||
$editor = wp_get_image_editor( $pdf_path );
|
||||
if ( is_wp_error( $editor ) ) {
|
||||
$this->markTestSkipped( $editor->get_error_message() );
|
||||
}
|
||||
|
||||
$attachment_id = $this->factory->attachment->create_object(
|
||||
$pdf_path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user