Repository navigation
Move handler tests that build the full stack to tests/Integration - #660
Merged
Merged
Conversation
Its setUp builds the full production symbol-knowledge stack over fixtures and its CoversClass list already names ExpressionResolver and ResolvedTypeOnly. The filename now matches what the test is. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Its setUp builds the full production symbol-knowledge stack over fixtures and its CoversClass list already names ExpressionResolver and ResolvedTypeOnly. The filename now matches what the test is. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Its setUp builds the full production symbol-knowledge stack over fixtures and its CoversClass list already names ExpressionResolver and ResolvedTypeOnly. The filename now matches what the test is. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Its setUp builds the full production symbol-knowledge stack and its CoversClass list names most of the completion pipeline (BuiltinTypeCandidates, CompositeCompletionSource, ExpressionResolver, KeywordCandidates, MemberCandidates, NamedArgumentCandidates, ResolvedTypeOnly, SymbolCandidates, VariableCandidates). The filename now matches what the test is. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This was referenced Sep 30, 2026
Firehed
marked this pull request as ready for review
September 30, 2026 23:15
Firehed
enabled auto-merge (squash)
September 30, 2026 23:15
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
=========================================
Coverage 99.65% 99.65%
Complexity 1903 1903
=========================================
Files 136 136
Lines 4882 4882
=========================================
Hits 4865 4865
Misses 17 17 ☔ View full report in Codecov by Harness. |
Firehed
added a commit
that referenced
this pull request
Oct 1, 2026
…suite split (#661) Follows #660. Adds real unit tests for the four handlers whose test files were moved to `tests/Integration/`, now that the `*HandlerTest` filenames are available again. ## What changed - New `BuildsHandlerRequestsTrait` and `StubsCollaboratorsTrait` under `tests/Handler/` carry the shared helpers. - New `SignatureHelpHandlerTest`, `DefinitionHandlerTest`, `HoverHandlerTest`, `CompletionHandlerTest` under `tests/Handler/`. Each stubs its handler's interface collaborators and asserts only on the handler's own behavior: method claim, short-circuits on malformed params / unopened documents / unresolved cursors, and the exact wire shape emitted for a resolved result. - `phpunit.xml.dist` now defines two disjoint testsuites: `unit` (everything outside `tests/Integration`) and `integration` (`tests/Integration` only). Running phpunit without `--testsuite` runs both. - Removes the integration tests that only duplicated the above (method claim, the three short-circuits, markup kind grid). ## Why Every production handler already takes its collaborators through interfaces, so writing real unit tests for them needs no change under `src/`. The prior fixture-driven suites rebuilt `KnowledgeStack::forProject`'s output in setUp — a duplicate wiring route the design rules flag. Shrinking the surface that reaches for `BuildsKnowledgeStackTrait` is a prerequisite for later replacing `Server::forProject` / `KnowledgeStack::forProject` with container factories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase 1 of a two-part change. Pure
git mvand class rename for the four*HandlerTest.phpfiles whose setUp builds the full production symbol-knowledge stack — they were already integration tests wearing a unit-test filename (their#[CoversClass]lists already name ExpressionResolver, ResolvedTypeOnly, and much of the completion pipeline).Phase 2 will add stub/mock-based unit tests for the same four handlers, plus a
phpunit.xml.distsplit intounit/integrationsuites.What changed
git mv tests/Handler/{SignatureHelp,Definition,Hover,Completion}HandlerTest.php→tests/Integration/{SignatureHelp,Definition,Hover,Completion}HandlerIntegrationTest.phpOpensDocumentsTraitpulled in explicitly now that the moved files no longer share its namespace.No behavior change; the same tests run and pass.
🤖 Generated with Claude Code