()
| 300 | |
| 301 | #[test] |
| 302 | fn highlight_self_keyword() { |
| 303 | let backend = create_test_backend(); |
| 304 | let php = r#"<?php |
| 305 | class 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 |
nothing calls this directly
no test coverage detected