Open
Conversation
Extended the PHPUnit test suite for the 'doingItWrong' function in WordPress. Added more comprehensive test cases, including the setup phase and validation for the error notice. These improvements enhance code quality by ensuring that the function behaves as expected under varying conditions.
Removed unnecessary actions in the 'doingItWrong' PHPUnit test setup. The setup is simplified for a cleaner and more focused testing of the 'doingItWrong' function. This streamlining allows for accurate and effective evaluation of the function's overall performance and expected behavior.
Renamed 'doingItWrong' PHPUnit test file and class to 'deprecatedHook' to match its function testing. Adjusted all method names, action hooks, comments, and tested functionalities inside test methods to focus on the '__deprecated_hook' function. This is a pivotal change for a more precise assessment of '__deprecated_hook' function's behavior and performance under varying scenarios.
… 'deprecatedArgument' to represent the actual function being tested. All related method names, action hooks, comments, and functionality within the test methods have been adjusted to focus on the '_deprecated_argument' function. This change allows for a more accurate evaluation of the '_deprecated_argument' function's behavior and performance.
…ile' to better reflect the functionality being tested. All relevant method names, hooks, comments, and tests have been updated accordingly. This refactoring allows more accurate and specific testing of the '_deprecated_file' function.
A typo was detected and fixed in the phpunit test file 'deprecatedClass.php'. The underscore separating '_deprecated_class' and 'function' in the method comments section was missing, which could lead to readability issues.
…om `deprecatedClass` to `deprecatedFunction`. All associated actions, filters, and method names within the test have been updated to match this change. This ensures our tests now correctly apply to deprecated functions instead of deprecated classes.
…t it is now testing deprecated arguments instead. As a part of this change, all references to the deprecated functions within the testing class have also been updated to correspond to deprecated arguments. Consequently, the test suite now appropriately checks deprecated arguments.
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
Member
|
@pbearne Left some feedback for your consideration. |
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
Author
|
@mukeshpanchal27 Thanks all good stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/60117