Make WordPress Core

Changeset 41017


Ignore:
Timestamp:
07/07/2017 12:06:36 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Media: Use a filename instead of a URL in image header tests to avoid triggering an outbound HTTP request causing an ImageMagick exception on some configurations.

Props danielbachhuber.
Fixes #41216.

File:
1 edited

Legend:

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

    r41016 r41017  
    112112        ) );
    113113
    114         $cropped = 'http://localhost/foo-cropped.png';
     114        $cropped = 'foo-cropped.png';
    115115
    116116        $object = $this->custom_image_header->create_attachment_object( $cropped, $id );
    117117        $this->assertEquals( 'foo-cropped.png', $object['post_title'] );
    118         $this->assertEquals( $cropped, $object['guid'] );
     118        $this->assertEquals( 'http://localhost/' . $cropped, $object['guid'] );
    119119        $this->assertEquals( 'custom-header', $object['context'] );
    120120        $this->assertEquals( 'image/jpeg', $object['post_mime_type'] );
     
    129129        ) );
    130130
    131         $cropped = 'http://localhost/foo-cropped.png';
     131        $cropped = 'foo-cropped.png';
    132132        $object = $this->custom_image_header->create_attachment_object( $cropped, $id );
    133133
Note: See TracChangeset for help on using the changeset viewer.