WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #18532, comment 9


Ignore:
Timestamp:
10/02/2014 01:53:59 PM (6 years ago)
Author:
kitchin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #18532, comment 9

    initial v1  
    331. Adjusts resize tests to match new behavior where it is off by one pixel from old behavior. I forgot to make a test to fail the bug report, so we need to do that still. The new numbers agree with IrfanView, Photoshop, any web browser, etc., of course. Because they round. This shows we need the patch.
    44
    5 2. Changes a bunch of `assertEquals()` to assertSame()` because the function should continue to return integers, not floats that look like integers.
     52. Changes a bunch of `assertEquals()` to `assertSame()` because the function should continue to return integers, not floats that look like integers.
    66
    7 3. I put the same rounding fix in image_resize_dimensions() for cropping.
     73. I put the same rounding fix in `image_resize_dimensions()` for cropping.
    88
    9 4. I have some xxx comments that need to be resolved or deleted.
     94. I have some `xxx` comments that need to be resolved or deleted.
    1010
    11 5. Getting scary looking console errors on my CentOS 5 system cPanel with ImageMagick 6.2.8 (yum up to date), so I disabled the unit tests that try to load a PNG or GIF when Worpdress decides ImageMagick only supports JPG (iterator support). They try to load a WP_Error object back into ImageMagick. Instead I did markTestSkipped() when
     115. Getting scary looking console errors on my CentOS 5 system cPanel with ImageMagick 6.2.8 (yum up to date), so I skipped-out the unit tests that try to load a PNG or GIF when Wordpress decides ImageMagick only supports JPG (iterator support). They try to load a WP_Error object back into ImageMagick. Instead I did `markTestSkipped()` when
    1212
    13135a. WP_Error reached in PNG or GIF test.
    1414
    15 5b. Any call to test_resize_bad_image() with ImageMagick is skipped.
     155b. Any time test_resize_bad_image() is called with ImageMagick.
    1616
    17 We will probably want a patch without the (5b) change, or condition (5b) on PNG support. There no need for the (5a) console errors at all, they need to be either assertions or skips.
     17We will probably want a patch without the (5b) change, or condition (5b) on PNG support. There is no need for the (5a) console errors at all, they need to be either assertions or skips.
    1818
    1919I kept the assert on ImageMagick PNG support in general, so you still get one Fail. (That makes it skip the assert for GIF support.)