• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHP_CodeSniffer / 7683241347
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: PSR2-WrongOpenercase-with-colon-and-bracket-is-unclear
DEFAULT BRANCH: master
Ran 28 Jan 2024 03:59AM UTC
Jobs 3
Files 258
Run time 19s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

28 Jan 2024 03:57AM UTC coverage: 65.351%. Remained the same
7683241347

push

github

jrfnl
Tests/Tokenizer: make failure messages more descriptive

Most Tokenizer tests first assert that the token `'code'` is correct and after that, that the token `'type'` is correct.
When the first assertion fails, an error message like this will be displayed:
`Failed asserting that 357 is identical to 313.`

That's because the PHP native token constants are integers. And even if someone would memorize all token constant integers, the integer values are different depending on the PHP version being used. All in all, that makes error messages like the above hard to decipher.

To mitigate this, a number of the Tokenizer tests already used the `$msg` parameter for the `assertSame()` call.

This commit adds this `$msg` parameter to more assertions to make the failure messages actually useful.

Includes introducing an interim `$tokenArray` variable in a lot of these tests to keep the line length in check.

15536 of 23773 relevant lines covered (65.35%)

6.69 hits per line

Jobs
ID Job ID Ran Files Coverage
1 php-8.1-custom-ini-true - 7683241347.1 28 Jan 2024 03:59AM UTC 258
64.41
GitHub Action Run
2 php-8.3-custom-ini-false - 7683241347.2 28 Jan 2024 03:59AM UTC 258
64.46
GitHub Action Run
3 php-7.2-custom-ini-false - 7683241347.3 28 Jan 2024 03:59AM UTC 258
61.78
GitHub Action Run
Source Files on build 7683241347
  • Tree
  • List 258
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #7683241347
  • 72232fc9 on github
  • Prev Build on 4.0 (#7669770934)
  • Next Build on 4.0 (#7691076887)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc