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

Function test_parse_defines_inside_block

tests/integration/parser.rs:1734–1740  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1732
1733#[tokio::test]
1734async fn test_parse_defines_inside_block() {
1735 let backend = create_test_backend();
1736 let content = concat!("<?php\n", "{\n", " define('BLOCK_CONST', 1);\n", "}\n",);
1737 let defines = backend.parse_defines(content);
1738 let names: Vec<&str> = defines.iter().map(|(n, _, _)| n.as_str()).collect();
1739 assert_eq!(names, vec!["BLOCK_CONST"]);
1740}
1741
1742#[tokio::test]
1743async fn test_parse_defines_mixed_with_classes_and_functions() {

Callers

nothing calls this directly

Calls 5

create_test_backendFunction · 0.85
parse_definesMethod · 0.80
iterMethod · 0.80
as_strMethod · 0.80
mapMethod · 0.45

Tested by

no test coverage detected