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

Function test_preprocess_context_directive

src/blade/preprocessor.rs:616–630  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

614
615 #[test]
616 fn test_preprocess_context_directive() {
617 let content = "@context('key')\n <p>{{ $value }}</p>\n@endcontext\n";
618 let (php, _) = preprocess(content);
619 assert!(
620 php.contains("if (true)"),
621 "should contain if (true): {}",
622 php
623 );
624 assert!(
625 php.contains("$value = '';"),
626 "should inject $value: {}",
627 php
628 );
629 assert!(php.contains("endif;"), "should contain endif: {}", php);
630 }
631
632 #[test]
633 fn test_preprocess_prologue_declares_view_directive() {

Callers

nothing calls this directly

Calls 1

preprocessFunction · 0.85

Tested by

no test coverage detected