[wp-trac] [WordPress Trac] #34087: Tests_Image_Intermediate_Size::test_get_intermediate_sizes_by_array_zero_width fails when the random value is 201

WordPress Trac noreply at wordpress.org
Fri Oct 2 14:13:19 UTC 2015


#34087: Tests_Image_Intermediate_Size::test_get_intermediate_sizes_by_array_zero_width
fails when the random value is 201
--------------------------+---------------------------
 Reporter:  jorbin        |       Owner:  boonebgorges
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  4.4
Component:  Media         |     Version:
 Severity:  normal        |  Resolution:  fixed
 Keywords:  2nd-opinion   |     Focuses:
--------------------------+---------------------------
Changes (by boonebgorges):

 * owner:   => boonebgorges
 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"34775"]:
 {{{
 #!CommitTicketReference repository="" revision="34775"
 More explicit tests for `image_get_intermediate_size()`.

 After [33807],
 `Tests_Image_Intermediate_Size::test_get_intermediate_sizes_by_array_zero_width()`
 was failing intermittently. This failure was due to the use of a random
 number
 for the image height. When the height was sufficiently large - $height >=
 202 -
 to change the aspect ratio of the cropped image (based on WP's threshold
 of a
 1px difference), the test passed. And when the height was exactly 200, the
 medium image size was hit exactly. The failure occurred only with a height
 of
 201, which is close enough to 200 so that WP determined that the aspect
 ratio
 of the potential crop was close enough to match.

 The current changeset splits the test into two, in order to demonstrate
 the
 failure.

 See #17626. Fixes #34087.
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34087#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list