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

valkyrjaio / valkyrja-php / 30416416065
100%

Build:
DEFAULT BRANCH: 26.x
Ran 29 Jul 2026 02:19AM UTC
Jobs 1
Files 1138
Run time 2min
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

29 Jul 2026 02:17AM UTC coverage: 100.0%. Remained the same
30416416065

push

github

web-flow
[Cli] Add an overridable exit seam to Exiter (#947)

# Description

`Exiter::exit()` is `static::$exit ? exit($code) :
static::frozenCallback($code)`.
Every test has to call `Exiter::freeze()` first, because the unfrozen
arm calls
`exit()` and would terminate the PHPUnit process — so that arm was never
executed and its branch could not be covered by any test.

The remedy is the seam pattern already used for irreducible native calls
elsewhere in the framework (the entry workers,
`ResponseSendRecorderFixture`):
the bare `exit($code)` moves into its own overridable
`protected static exitCallback()` marked `@codeCoverageIgnore` — that
one
statement is genuinely untestable — and `exit()` now dispatches to it
through
`static::`. A `Tests\Fixtures` subclass overrides the seam to record the
code it
was called with, so the unfrozen arm of the ternary runs under test
while the
process survives.

Behavior is unchanged: unfrozen still exits with the given code, frozen
still
echoes it via `frozenCallback()`.

While adding the tests I also fixed `ExiterTest::testExitCode`, which
reassigned
`$code` from `ob_get_clean()` and then asserted `assertSame((string)
$code, $code)`
— comparing the captured output with itself, so it always passed
regardless of
what `Exiter` echoed. It now captures the output in `$output` and
asserts it
against the exit code.

Verified per-shard (never merged — Xdebug builds a different branch map
for a
function depending on whether it ran, so merged shard data invents
branches):

```
composer phpunit-path-coverage-shard Cli
```

**`src/Valkyrja/Cli/Server/Support/Exiter.php`: branches 5/6 → 7/7,
paths
4/5 → 5/5.** Line coverage stays at 100% — the seam body is excluded via
`@codeCoverageIgnore`.

## Types of changes

- [x] Improvement _(non-breaking change which improves code)_
- [ ] Bug fix _(non-breaking change which fixes an issue)_
- [ ] New feature _(non-breaking change which adds functionality)_
- [ ] Deprecation _(breaking change which... (continued)

1 of 0 new or added lines in 0 files covered. (NaN%)

12595 of 12595 relevant lines covered (100.0%)

23.76 hits per line

Jobs
ID Job ID Ran Files Coverage
1 30416416065.1 29 Jul 2026 02:19AM UTC 1138
100.0
GitHub Action Run
Source Files on build 30416416065
  • Tree
  • List 1138
  • Changed 1
  • Source Changed 1
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30416416065
  • 4527bc9a on github
  • Prev Build on 26.x (#30415926697)
  • Next Build on 26.x (#30416951256)
  • Delete
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