Tests/Tokenizer: improve switch keyword tests#812
Merged
jrfnl merged 2 commits intoPHPCSStandards:masterfrom Feb 27, 2025
Merged
Tests/Tokenizer: improve switch keyword tests#812jrfnl merged 2 commits intoPHPCSStandards:masterfrom
jrfnl merged 2 commits intoPHPCSStandards:masterfrom
Conversation
11 tasks
jrfnl
requested changes
Feb 24, 2025
tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc
Outdated
Show resolved
Hide resolved
tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc
Outdated
Show resolved
Hide resolved
tests/Core/Tokenizers/Tokenizer/RecurseScopeMapSwitchTokenScopeTest.inc
Outdated
Show resolved
Hide resolved
Contributor
Author
|
Thanks for your review, @jrfnl. I believe I addressed all the points that you raised. Could you please take a second look when you get a chance? |
jrfnl
approved these changes
Feb 27, 2025
Member
jrfnl
left a comment
There was a problem hiding this comment.
Thanks for working on this @rodrigoprimo ! LGTM now.
This commits improves the stability of the switch keyword tests by ensuring that specific markers are used to get the scope closer and scope opener tokens.
This commit expands a bit the switch keyword tests by adding three more test cases: - switch with closure containing return type in the condition - switch with arrow function in the condition - switch with arrow function containing return type in the condition
6ed9ac8 to
0244678
Compare
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.
Description
This PR improves the switch keyword tokenizer tests by adding the tests suggested in #595 (comment). It also adds another commit to improve the tests stability by ensuring that a marker is always used to get the scope opener and scope closer.
Related issues/external references
Part of the changes suggested in #595 (comment)
Types of changes
PR checklist