mirror of
git://develop.git.wordpress.org/
synced 2025-01-29 10:38:22 +01:00
Tests: Temporarily skip PDF tests if they fail due to ImageMagick permission errors.
Merges [48338], [48341] to the 4.9 branch. See #50573. git-svn-id: https://develop.svn.wordpress.org/branches/4.9@48487 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f6af1ab2ef
commit
62bccb1619
@ -371,6 +371,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = '/tmp/wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $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, 0, array(
|
||||
'post_mime_type' => 'application/pdf',
|
||||
) );
|
||||
@ -432,6 +437,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = get_temp_dir() . 'wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $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, 0, array(
|
||||
'post_mime_type' => 'application/pdf',
|
||||
@ -490,6 +500,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$test_file = '/tmp/wordpress-gsoc-flyer.pdf';
|
||||
copy( $orig_file, $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, 0, array(
|
||||
'post_mime_type' => 'application/pdf',
|
||||
) );
|
||||
@ -545,6 +560,11 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
$pdf_path = '/tmp/test.pdf';
|
||||
copy( DIR_TESTDATA . '/images/wordpress-gsoc-flyer.pdf', $pdf_path );
|
||||
|
||||
$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( $pdf_path, 0, array(
|
||||
'post_mime_type' => 'application/pdf',
|
||||
) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user