()
| 1681 | |
| 1682 | #[test] |
| 1683 | fn completions_case_insensitive() { |
| 1684 | // Function needs a param so that @param is emitted. |
| 1685 | let content = "<?php\n/**\n * @PAR\n */\nfunction foo(int $n): void {}\n"; |
| 1686 | let pos = Position { |
| 1687 | line: 2, |
| 1688 | character: 7, |
| 1689 | }; |
| 1690 | let items = build_phpdoc_completions( |
| 1691 | content, |
| 1692 | "@PAR", |
| 1693 | DocblockContext::FunctionOrMethod, |
| 1694 | pos, |
| 1695 | &std::collections::HashMap::new(), |
| 1696 | &None, |
| 1697 | &SmartContext::EMPTY, |
| 1698 | ); |
| 1699 | let filter_texts: Vec<&str> = items |
| 1700 | .iter() |
| 1701 | .filter_map(|i| i.filter_text.as_deref()) |
| 1702 | .collect(); |
| 1703 | |
| 1704 | assert!( |
| 1705 | filter_texts.contains(&"@param"), |
| 1706 | "Should match case-insensitively" |
| 1707 | ); |
| 1708 | } |
| 1709 | |
| 1710 | #[test] |
| 1711 | fn completions_have_keyword_kind() { |
nothing calls this directly
no test coverage detected