Make WordPress Core

Opened 9 years ago

Closed 7 years ago

#36589 closed defect (bug) (duplicate)

Don't use localhost in Tests_Image_Header tests

Reported by: ocean90's profile ocean90 Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.9
Component: Customize Keywords:
Focuses: Cc:

Description (last modified by ocean90)

Tests_Image_Header::test_create_attachment_object() and Tests_Image_Header::test_insert_cropped_attachment() are passing http://localhost/foo-cropped.png to Custom_Image_Header::create_attachment_object(). This method is using getimagesize() for the URL. I'm not sure if this a config issue but it seems like the timeout is pretty high so the tests are taking a minute to complete.

Output of PHPunit:

1) Tests_Image_Header::test_create_attachment_object
ImagickException: getimagesize(http://localhost/foo-cropped.png): failed to open stream: Connection refused

src/wp-admin/custom-header.php:1160
tests/phpunit/tests/image/header.php:116

2) Tests_Image_Header::test_insert_cropped_attachment
ImagickException: getimagesize(http://localhost/foo-cropped.png): failed to open stream: Connection refused

src/wp-admin/custom-header.php:1160
tests/phpunit/tests/image/header.php:132

Change History (6)

#1 @ocean90
9 years ago

  • Description modified (diff)

#2 @celloexpressions
9 years ago

  • Milestone changed from Awaiting Review to Future Release

This ticket was mentioned in Slack in #core-customize by celloexpressions. View the logs.


8 years ago

#4 @celloexpressions
8 years ago

  • Version set to 3.9

+1, can someone make a patch? This was presumably introduced in 3.9.

#5 @stevenlinx
8 years ago

sry., what URLs do you propose to use instead?

#6 @ocean90
7 years ago

  • Keywords needs-patch removed
  • Milestone Future Release deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #41216.

Note: See TracTickets for help on using tickets.