Changes between Initial Version and Version 2 of Ticket #30522
- Timestamp:
- 11/27/2014 04:07:17 AM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #30522 – Description
initial v2 6 6 }}} 7 7 8 There's a few options, including asserting the count is the same, however that doesn't work as something like this would then alsopass:8 There's a few options, including asserting the count is the same, however that doesn't work as something like this would then still pass: 9 9 {{{ 10 10 $expected = array( 1, 2, 2 ); … … 13 13 }}} 14 14 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.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 would account for the above cases. 16 16 17 17 However, 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: