Skip to content

[11.x] Add test for Arr::sortRecursiveDesc() method. #51716

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Jun 5, 2024

Conversation

lmottasin
Copy link
Contributor

Summary:
This pull request adds a unit test for the Arr::sortRecursiveDesc() method in the Arr utility class. The new test ensures that the method correctly sorts arrays and nested arrays in descending order.

Changes:

  • Added a test case in ArrTest to verify the functionality of sortRecursiveDesc().
  • The test covers various scenarios including:
    • Sorting simple arrays with numerical and string values.
    • Sorting multi-dimensional arrays with nested elements.
    • Handling of edge cases such as empty arrays and arrays with mixed value types.

Reason:
Adding this test ensures that the sortRecursiveDesc() method behaves as expected across different use cases and improves the robustness of the Arr utility class.

@lmottasin
Copy link
Contributor Author

@crynobone Review please?

@taylorotwell taylorotwell merged commit 92d1efd into laravel:11.x Jun 5, 2024
28 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants