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

Function interface_extends_interface

tests/integration/code_lens.rs:363–387  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

361
362#[test]
363fn interface_extends_interface() {
364 let backend = create_test_backend();
365 let content = r#"<?php
366interface BaseRepo {
367 public function find(int $id): ?object;
368}
369
370interface UserRepo extends BaseRepo {
371 public function findByEmail(string $email): ?object;
372}
373
374class 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

Callers

nothing calls this directly

Calls 3

create_test_backendFunction · 0.85
get_code_lensesFunction · 0.85
lens_titlesFunction · 0.85

Tested by

no test coverage detected