Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Sep 13, 2020

Related to #201

As the token counts for identifier names are different between PHP < 8 and PHP 8 and depending on which PHPCS version will be used, the test for the BCFile::getTokensAsString() method is now unstable.

This commit adds a new test case (calculation) which doesn't suffer from that problem to allow for testing with exact token lengths, the same as was previously done with the namespace declaration test.

Includes:

  • In BCFile/GetTokensAsStringTest: add an additional test to still cover the namespace declaration test case.
  • In GetTokensAsString/GetTokensAsStringTest: add a test for the new calculation test case.

…t of PHP 8 identifier names

Related to 201

As the token counts for identifier names are different between PHP < 8 and PHP 8 and depending on which PHPCS version will be used, the test for the `BCFile::getTokensAsString()` method is now unstable.

This commit adds a new test case (calculation) which doesn't suffer from that problem to allow for testing with exact token lengths, the same as was previously done with the namespace declaration test.

Includes:
* In `BCFile/GetTokensAsStringTest`: add an additional test to still cover the namespace declaration test case.
* In `GetTokensAsString/GetTokensAsStringTest`: add a test for the new calculation test case.
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Sep 13, 2020
@jrfnl jrfnl merged commit 1ba8c9e into develop Sep 13, 2020
@jrfnl jrfnl deleted the feature/gettokensasstring-change-code-samples-used-in-test branch September 13, 2020 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants