Skip to content

test: cover default options, rejected responses and RPC error wrapping - #22

Merged
roxblnfk merged 1 commit into
2.xfrom
coverage
Oct 9, 2026
Merged

roxblnfk merged 1 commit into
2.xfrom
coverage

Conversation

@roxblnfk

@roxblnfk roxblnfk commented Oct 9, 2026

Copy link
Copy Markdown
Member

What was changed

Tests only, no production code changes.

  • create() without optional arguments sends the documented defaults (1 process, no exec timeout, 30 s restart delay, 5 s stop timeout, empty env).
  • create(), restart() and terminate() return false when RoadRunner answers ok: false.
  • RPC errors are rethrown as Exception\ServiceException with tabs and newlines flattened to spaces, the original code and the RPC exception as previous; statuses() wraps them too.
  • list() and statuses() with nothing to report return []; a process without an error status gets 'error' => null.
Line coverage Before After
Statements 61 / 66 (92.4%) 63 / 66 (95.5%)
Methods fully covered 3 / 7 4 / 7

The three uncovered statements are the return false after handleError() in create(), restart() and terminate(): handleError() returns never, so they are unreachable. The assert() argument checks in create() are not tested, since they depend on zend.assertions.

Checklist

  • Tested
    • vendor/bin/testo locally on PHP 8.4 with Xdebug coverage: 18 tests passed (9 before)
    • Unit tests added

@roxblnfk
roxblnfk requested a review from a team October 9, 2026 20:22
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown

Important

  • 馃攳 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

鈿欙笍 Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91011f25-a096-4b82-a86c-28e76a711b74

  • Autofix 路 Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

鉂わ笍 Share

Comment @coderabbitai help to get the list of available commands.

@roxblnfk
roxblnfk merged commit a3236f3 into 2.x Oct 9, 2026
8 of 9 checks passed
@roxblnfk
roxblnfk deleted the coverage branch October 9, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant