()
| 361 | |
| 362 | #[test] |
| 363 | fn interface_extends_interface() { |
| 364 | let backend = create_test_backend(); |
| 365 | let content = r#"<?php |
| 366 | interface BaseRepo { |
| 367 | public function find(int $id): ?object; |
| 368 | } |
| 369 | |
| 370 | interface UserRepo extends BaseRepo { |
| 371 | public function findByEmail(string $email): ?object; |
| 372 | } |
| 373 | |
| 374 | class EloquentUserRepo implements UserRepo { |
| 375 | public function find(int $id): ?object { return null; } |
| 376 | public function findByEmail(string $email): ?object { return null; } |
| 377 | } |
| 378 | "#; |
| 379 | let uri = "file:///test.php"; |
| 380 | let lenses = get_code_lenses(&backend, uri, content); |
| 381 | let titles = lens_titles(&lenses); |
| 382 | |
| 383 | assert_eq!(titles.len(), 2); |
| 384 | // find() comes from BaseRepo via the extends chain |
| 385 | assert!(titles.contains(&"◆ BaseRepo::find")); |
| 386 | assert!(titles.contains(&"◆ UserRepo::findByEmail")); |
| 387 | } |
| 388 | |
| 389 | // ─── Cross-File Override ──────────────────────────────────────────────────── |
| 390 |
nothing calls this directly
no test coverage detected