From bb6e34a7fd236f1b88bc2ccf3b0d91a557368e45 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 7 Jul 2017 00:06:36 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@41017 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/image/header.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/phpunit/tests/image/header.php b/tests/phpunit/tests/image/header.php index 9c68aaa841..a76ee2cd6e 100644 --- a/tests/phpunit/tests/image/header.php +++ b/tests/phpunit/tests/image/header.php @@ -111,11 +111,11 @@ class Tests_Image_Header extends WP_UnitTestCase { 'guid' => 'http://localhost/foo.png' ) ); - $cropped = 'http://localhost/foo-cropped.png'; + $cropped = 'foo-cropped.png'; $object = $this->custom_image_header->create_attachment_object( $cropped, $id ); $this->assertEquals( 'foo-cropped.png', $object['post_title'] ); - $this->assertEquals( $cropped, $object['guid'] ); + $this->assertEquals( 'http://localhost/' . $cropped, $object['guid'] ); $this->assertEquals( 'custom-header', $object['context'] ); $this->assertEquals( 'image/jpeg', $object['post_mime_type'] ); } @@ -128,7 +128,7 @@ class Tests_Image_Header extends WP_UnitTestCase { 'guid' => 'http://localhost/foo.png' ) ); - $cropped = 'http://localhost/foo-cropped.png'; + $cropped = 'foo-cropped.png'; $object = $this->custom_image_header->create_attachment_object( $cropped, $id ); $cropped_id = $this->custom_image_header->insert_attachment( $object, $cropped );