Make WordPress Core

Changes between Version 1 and Version 2 of Ticket #56800, comment 5


Ignore:
Timestamp:
03/03/2023 03:40:02 AM (20 months ago)
Author:
costdev
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #56800, comment 5

    v1 v2  
    77------
    88
    9 Note that there are 462 uses of `$this->assertEquals()` remaining in the test suite. Many of these are testing objects, and are therefore fine. However, I think we should pursue the intention to add two new assertions in 6.3:
     9Note that there are 462 uses of `$this->assertEquals()` remaining in the test suite. Many of these are testing objects, and are therefore fine. However, I think we should pursue the intention to add two new assertion conventions in 6.3:
    1010
    11 - `assertSimilarObject()` - A wrapper for `assertIsObject()` and `assertEquals()` when comparing objects.
    12 - `assertArrayEqualsWithObject()` - A wrapper for `assertIsArray()` and `assertEquals()` when comparing arrays containing at least one object.
     11- `assertSimilarObject()` - A new assertion that acts as a wrapper for `assertIsObject()` and `assertEquals()` when comparing objects.
     12- `assertArrayEquals()` - An existing assertion for use when comparing arrays containing at least one object.
    1313
    1414Why?
     
    1616
    1717When?
    18 I can submit a PR for these assertions as soon as we branch for 6.3. There was support for these in previous cycles, but we never got around to it.
     18I can submit a PR for the new `assertSimilarObject()` assertion as soon as we branch for 6.3. There was support for using these assertions in previous cycles, but we never got around to it.
    1919
    2020-----