MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / highlight_self_keyword

Function highlight_self_keyword

tests/integration/document_highlight.rs:302–324  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

300
301#[test]
302fn highlight_self_keyword() {
303 let backend = create_test_backend();
304 let php = r#"<?php
305class Counter {
306 private static int $count = 0;
307 public static function increment(): void {
308 self::$count++;
309 }
310 public static function get(): int {
311 return self::$count;
312 }
313}
314"#;
315
316 // Cursor on `self` at line 4
317 let highlights = highlight_at(&backend, "file:///test.php", php, 4, 9);
318
319 assert!(
320 highlights.len() >= 2,
321 "expected at least 2 highlights for self keyword, got {}",
322 highlights.len()
323 );
324}
325
326// ─── Edge cases ─────────────────────────────────────────────────────────────
327

Callers

nothing calls this directly

Calls 2

create_test_backendFunction · 0.85
highlight_atFunction · 0.85

Tested by

no test coverage detected