Skip to content

Move context-filtering completion tests to the end-to-end tier - #719

Merged
Firehed merged 5 commits into
mainfrom
completion-no-answer-tier
Oct 7, 2026
Merged

Firehed merged 5 commits into
mainfrom
completion-no-answer-tier

Conversation

@Firehed

@Firehed Firehed commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Moves the context-filtering completion tests out of CompletionHandlerIntegrationTest into completion-context-filtering.php: a comment, member access in a comment, a heredoc (variables only), and the position after a finished statement.

Part of #694.

Unit tests. CompositeCompletionSourceTest now covers the composite's early returns and its None classification:

  • In a comment, and after a finished statement, nothing is offered, even with every symbol kind available.
  • Member access in a comment offers nothing even when members resolve: the comment check comes first.
  • In an interpolated string, only variables are offered, even inside a call.

ContextDetectorTest and CompletionClassifierTest already own which positions are comments, strings, heredocs, or unclassified.

Script. The finished-statement case types (); after an existing marker rather than opening inline PHP. The plain-comment case's fixture has no word before the cursor, so it would answer nothing even without the early return; member access in a comment is the case that needs it.

A moved position. The deleted "unknown context" test put its cursor before the ; of $x = 1;, where the prefix is 1. Its name says after the statement, so both replacements put the cursor there.

Coverage. CompositeCompletionSource is now fully covered by its own unit test.

🤖 Generated with Claude Code

Firehed and others added 3 commits October 7, 2026 12:22
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.75%. Comparing base (237978d) to head (9919c42).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #719      +/-   ##
============================================
+ Coverage     82.71%   82.75%   +0.04%     
  Complexity     1901     1901              
============================================
  Files           135      135              
  Lines          4876     4876              
============================================
+ Hits           4033     4035       +2     
+ Misses          843      841       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

Firehed and others added 2 commits October 7, 2026 12:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Firehed Firehed changed the title Move no-answer completion tests to the end-to-end tier Move context-filtering completion tests to the end-to-end tier Oct 7, 2026
@Firehed
Firehed marked this pull request as ready for review October 7, 2026 20:02
@Firehed
Firehed merged commit 1d343e1 into main Oct 7, 2026
9 checks passed
@Firehed
Firehed deleted the completion-no-answer-tier branch October 7, 2026 20:08
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