Make WordPress Core

Ticket #39875: 39875-fix-tests.diff

File 39875-fix-tests.diff, 668 bytes (added by joemcgill, 8 years ago)
  • tests/phpunit/tests/image/functions.php

    diff --git tests/phpunit/tests/image/functions.php tests/phpunit/tests/image/functions.php
    index b64d43b8ac2..7ed2f0b1b20 100644
    class Tests_Image_Functions extends WP_UnitTestCase { 
    468468         * @ticket 39875
    469469         */
    470470        public function test_pdf_preview_doesnt_overwrite_existing_jpeg() {
     471                if ( ! wp_image_editor_supports( array( 'mime_type' => 'application/pdf' ) ) ) {
     472                        $this->markTestSkipped( 'Rendering PDFs is not supported on this system.' );
     473                }
     474
    471475                // Dummy JPEGs.
    472476                $jpg1_path = '/tmp/test.jpg'; // Straight.
    473477                file_put_contents( $jpg1_path, 'asdf' );