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

emgiezet / errbit-php / #6
100%
master: 100%

Build:
Build:
LAST BUILD BRANCH: test/coverage-gaps
DEFAULT BRANCH: master
Ran 18 Aug 2026 02:49PM UTC
Jobs 1
Files 16
Run time 1min
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

18 Aug 2026 12:36PM UTC coverage: 100.0% (+8.8%) from 91.231%
#6

Pull #47

php-coveralls

emgiezet
test: close the coverage gaps, 91.26% -> 100% lines

Tests only; no src changes.

Lines: 91.26% -> 100.00% (538/538)
Methods: 85.71% -> 100.00% (56/56)
Classes: 69.23% -> 100.00% (13/13)
Suite: 111 -> 124 tests, 207 -> 244 assertions

SocketWriter::write() was the big one at 44.90%, entirely untested because it
opens its own socket and so cannot be mocked. Covered by binding a server on an
ephemeral loopback port and pointing the config at it; nothing leaves the
machine. Three paths:

- sync TCP: write() connects, writes and closes, so the payload is already
  buffered when it returns and the test can accept afterwards without a second
  process.
- async UDP fragmentation: a >7000 character payload splits into fragments
  sharing a message id, with the final one flagged. Asserted without depending on
  arrival order, and with a 1MB so_rcvbuf, since UDP promises neither ordering
  nor delivery. Ran 8x locally without a flake.
- charactersToRead: the proxy read-back branch. The server cannot reply while
  write() is blocked in fread(), so this one ends on the 1s stream timeout, which
  is the entire runtime cost of the new tests.

Also covered:
- ErrorHandlers::onShutdown() via a suppressed trigger_error() to populate
  error_get_last(); unsuppressed, PHPUnit converts it to a failure first.
- Notice's request URL assembly, one case per guessProtocol()/guessHost()/
  guessPort() branch: forwarded proto, port 443, port 80, non-standard port,
  SERVER_NAME fallback, loopback fallback.
- Notice's empty-backtrace branch. Throwable cannot be mocked (PHP forbids
  userland classes implementing it) and getTrace() is final, so the internal
  trace is emptied by reflection.
- Errbit's user-agent filter skip, taken when no user agent exists at all, e.g.
  on CLI, and getWriter() instantiating default_writer when none was set.

Note that Exception, ConfigurationException and WriterInterface report 0% purely
because they have zero executable statements - empty subcl... (continued)
Pull Request #47: test: close the coverage gaps, 91.26% → 100% lines

536 of 536 relevant lines covered (100.0%)

19.67 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #6.1 18 Aug 2026 02:49PM UTC 16
100.0
Source Files on build #6
  • Tree
  • List 16
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #47
  • PR Base - master (#)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc