Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #52035, comment 13


Ignore:
Timestamp:
07/10/2024 01:13:40 PM (2 years ago)
Author:
leogermani

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #52035, comment 13

    initial v1  
    991. All the tests that use that data provider add only one submenu with a custom position, after adding several submenus with no position informed. One of the things we are fixing here is the addition of several submenus with custom positions, I think we should test that.
    1010
    11 2. Now that you have changed how the array keys are handled, I think we could have a better test to check if the menu felt in the right position.
     112. Now that you have changed how the array keys are handled, I think we could have a better test to check if the menu fell in the right position.
    1212
    13 The data provider you are passing on `array( 123456, 123456 )` for example looks like a weak test to me. We are only testing that the key was preserved, but we are not testing whether `ksort` had the expected behavior.
     13The data provider you are passing on `array( 123456, 123456 )` for example looks like a weak test to me. We are only testing that the key was preserved, but we are not testing whether `ksort` produced the expected outcome.
    1414
    1515Maybe we could add a test that resets the array keys, or loops through the submenus, and test the actual position of each item.