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.
👉🏻 Based on reviewing the code coverage reports.
Numbers: fix incorrect code coverage reporting
PR #293 split some code from the
getCompleteNumber()
method off into a separateupdateResult()
method used only by thegetCompleteNumber()
method, however code coverage was not being recorded for that new method as no@covers
tag had been added for that method to theGetCompleteNumberTest
class.Fixed now.
TokenNameTest: fix incorrect test cases
Turns out those were still PHPCS native tokens, not PHP native ones 😂
BCFile\GetConditionTest::testNonConditionalToken() fix target token
With the changes in PHP 8.0, the
T_STRING
(namespace name) target token may not exist as it may be tokenized asT_NAME_QUALIFIED
instead.With this change, the correct token should now still be retrieved to allow the test to test what it is supposed to test.
UtilityMethodTestCaseTest: split off the test for the
expectPhpcsException()
methodThe
UtilityMethodTestCase::expectPhpcsException()
method provides a polyfill for changed PHPUnit functionality. To allow for testing this polyfill properly, it should be tested without the PHPUnit Polyfills active as external standards using theUtilityMethodTestCase
may not implement the PHPUnit Polyfills.To do so, the tests specific to the
UtilityMethodTestCase::expectPhpcsException()
method have been split off into their own test class which extends theUtilityMethodTestCase
directly, instead of extending thePolyfilledTestCase
.GetCompleteNumberTest: add test for int max handling
While the value of
PHP_INT_MAX
will differ depending on whether PHP is compiled as 32-bits or 64-bits, this test value should convert to float in both cases.