WordPress.org

Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #35030, comment 31


Ignore:
Timestamp:
03/18/2016 07:20:17 PM (6 years ago)
Author:
azaozz
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #35030, comment 31

    initial v1  
    551. Not sure what is being tested with `test_wp_calculate_image_srcset_src_first()`. It is not needed to specifically test if the image src is first in srcset. That is being tested by all other srcset tests already.
    66
    7 Another big problem there is that some of the test data is randomized. This means it may introduce intermittent failures, i.e. some times the test will pass, other times it will fail. That's really bad for testing :) If there are 10 cases, all need to be tested every time so we can see which one fails.
     7Another big problem there is that some of the test data is randomized. This means it may introduce intermittent failures. As we are testing array order it may fail because of `shuffle()`. That's really bad for testing :) If there are 10 cases, all need to be tested every time so we can see which one fails.
    88
    992. There is a lot of repetition in most of the srcset testing functions when generating comparison strings. It would be good to "DRY" that and include the functionality from the new `_src_first()` helper. This is pretty much the same in 4 places: