Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions laravel-lsp/src/tests/helper_identifier_hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,15 @@ fn helper_identifier_hover_works_in_blade_embedded_php() {
.iter()
.find(|h| h.name == "route")
.expect("route helper identifier captured in Blade-embedded PHP");
// The card renders the same regardless of host file type.
assert!(hover::helper_identifier_card(&route.name, None).is_some());
// The card renders the same regardless of host file type — assert its
// content, not mere existence, so a wrong or empty card can't pass.
let card = hover::helper_identifier_card(&route.name, None)
.expect("route is curated, so a card renders in Blade-embedded PHP too");
assert!(card.contains("**route**"), "card headers the helper name");
assert!(
card.contains("named route"),
"card carries the Laravel-aware synopsis"
);
}

#[test]
Expand Down