test: strengthen helper_identifier_hover_works_in_blade_embedded_php to assert card content - #144
Merged
mikebronner merged 2 commits intoJun 15, 2026
Conversation
Replace the bare `.is_some()` assertion in
`helper_identifier_hover_works_in_blade_embedded_php` with content
assertions — `card.contains("**route**")` and the `route` synopsis
keyword `"named route"` — so a wrong or empty card can no longer pass.
The test now proves its own claim of host-file-type invariance rather
than merely asserting a card exists, matching the content-assertion
pattern used by the sibling curated-helper hover tests.
Fixes #136
mikebronner
marked this pull request as ready for review
June 15, 2026 16:06
There was a problem hiding this comment.
✅ Approved
Review Summary
- A focused test-only change (+9 −2) strengthening
helper_identifier_hover_works_in_blade_embedded_php— exactly the follow-up #136 asked for. - AC #1 met — the bare
hover::helper_identifier_card(&route.name, None).is_some()is replaced with content assertionscard.contains("**route**")andcard.contains("named route"). Both strings are confirmed present in the real card: the header is built asformat!("**{}**", h)(hover.rs:126) and theroutesynopsis is"Generate a URL for a named route."(hover.rs:249), pinned byhover/tests.rs:428. - AC #2 met — the Blade-embedded-PHP host path is still exercised end to end:
parse_ownedonnav.blade.phpwith{{ route('home') }}, resolved viadata.helper_refs(the Blade-extraction field), not a shortcut. - AC #3 met — the diff is a single hunk inside the one function; every sibling test is untouched.
- AC #4 met — CI is all green (LSP — test, fmt, clippy; Extension — wasm/fmt/clippy).
What's Good
- The new assertions are meaningful discriminators, not trivia —
named routeis distinctive to theroutesynopsis and absent from the other six curated helpers, and**route**rules out a wrong-helper card. A wrong or empty card now fails, which was the whole point. - The assertion pair mirrors the established
every_curated_helper_renders_its_own_cardconvention exactly (("route", "named route")), so the strengthened test reads as a natural extension of the file's pattern. - The
.expect(...)message documents why aNonewould be a genuine regression rather than masking one.
📋 Non-blocking follow-ups
- None.
Ready for @mikebronner to merge.
mikebronner
deleted the
chore/136-test-strengthen-helperidentifierhoverworksinbladee
branch
June 15, 2026 16:59
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.
Summary
Implements #136 — strengthens
helper_identifier_hover_works_in_blade_embedded_phpso it asserts the rendered card content in the Blade-embedded-PHP context, not merely that a card exists. Follow-up from Holmes's review of PR #135 (AC #3 of #119 had pinned this test as unmodifiable, so it could only be touched here).Changes
hover::helper_identifier_card(&route.name, None).is_some()assertion with content assertions:card.contains("**route**")(the header) andcard.contains("named route")(theroutesynopsis keyword).parse_ownedonnav.blade.phpwithroute('home')inside a Blade{{ }}echo, finding the helper viahelper_refs— so it now proves its own claim of host-file-type invariance.Acceptance Criteria
.is_some()assertion withcard.contains("**route**")andcard.contains("named route")route()call inside Blade{{ }}), not just a directhelper_identifier_cardcallcargo test --lib --bins,cargo fmt --check, andcargo clippypass with no new warningsTest Plan
cargo fmt --check— cleancargo clippy --lib --bins— no warningscargo test --lib --bins— 2041 tests pass (1747 + 294), 0 failures; all 8helper_identifier_hovertests green including the strengthened oneFixes #136