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

Function create_fixture_backend

tests/fixture_runner.rs:73–84  ·  view source on GitHub ↗

Create a test backend with embedded class and function stubs pre-loaded.

()

Source from the content-addressed store, hash-verified

71
72/// Create a test backend with embedded class and function stubs pre-loaded.
73fn create_fixture_backend() -> Backend {
74 let mut class_stubs: HashMap<&'static str, &'static str> = HashMap::new();
75 class_stubs.insert("UnitEnum", UNIT_ENUM_STUB);
76 class_stubs.insert("BackedEnum", BACKED_ENUM_STUB);
77
78 let mut func_stubs: HashMap<&'static str, &'static str> = HashMap::new();
79 func_stubs.insert("array_reduce", ARRAY_FUNC_STUB);
80 func_stubs.insert("array_sum", ARRAY_FUNC_STUB);
81 func_stubs.insert("array_product", ARRAY_FUNC_STUB);
82
83 Backend::new_test_with_all_stubs(class_stubs, func_stubs, HashMap::new())
84}
85
86// ─── Fixture parsing ────────────────────────────────────────────────────────
87

Callers 4

run_completionFunction · 0.85
run_hoverFunction · 0.85
run_definitionFunction · 0.85
run_signature_helpFunction · 0.85

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected