-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FindEndOfStatementTest: simplify the tests
* Use the `AbstractMethodUnitTest::getTargetToken()` method instead of doing a `findNext()` with a calculation. This makes the `$start` token retrieval more descriptive. * Assert based on the token pointers, not the sub-array value. As for both the "expected" as well as "found" values, the token sub-array is retrieved from the same `$tokens` variable, if the token pointers are the same, the sub-arrays will be too, so doing the comparison based on the sub-array doesn't add any extra value to the test. Also: doing an array assertion is more expensive than doing a simple integer based assertion. * Remove redundant calls to the `getTokens()` method.
- Loading branch information
Showing
1 changed file
with
31 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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