Make WordPress Core

Changes between Initial Version and Version 2 of Ticket #30522


Ignore:
Timestamp:
11/27/2014 04:07:17 AM (10 years ago)
Author:
dd32
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30522 – Description

    initial v2  
    66}}}
    77
    8 There's a few options, including asserting the count is the same, however that doesn't work as something like this would then also pass:
     8There's a few options, including asserting the count is the same, however that doesn't work as something like this would then still pass:
    99{{{
    1010$expected = array( 1, 2, 2 );
     
    1313}}}
    1414
    15 The function currently only cares about the values (as it uses `array_diff()`), so we could simply perform a sort and then {{{assertEquals}}} the resulting array, that could account for the above cases.
     15The function currently only cares about the values (as it uses `array_diff()`), so we could simply perform a sort and then {{{assertEquals}}} the resulting array, that would account for the above cases.
    1616
    1717However, we also have some tests (Terms for example) which are testing  `id=>slug`, those tests could have the incorrect `id` (array key) and still pass (both now, and with the sorting option), eg: