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

PHPCSStandards / PHP_CodeSniffer / 7683241347 / 1
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: feature/memory-usage-tweaks
DEFAULT BRANCH: master
Ran 28 Jan 2024 03:59AM UTC
Files 258
Run time 6s
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: 64.413%. Remained the same
7683241347.1

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.

15246 of 23669 relevant lines covered (64.41%)

2.27 hits per line

Source Files on job php-8.1-custom-ini-true - 7683241347.1
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 7683241347
  • 72232fc9 on github
  • Prev Job for on 4.0 (#7669770934.1)
  • Next Job for on 4.0 (#7691076887.3)
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