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

Function test_preprocess_session_directive

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

Source from the content-addressed store, hash-verified

543
544 #[test]
545 fn test_preprocess_session_directive() {
546 let content = "@session('key')\n <p>{{ $value }}</p>\n@endsession\n";
547 let (php, _) = preprocess(content);
548 assert!(
549 php.contains("if (true)"),
550 "should contain if (true): {}",
551 php
552 );
553 assert!(
554 php.contains("$value = '';"),
555 "should inject $value: {}",
556 php
557 );
558 assert!(php.contains("endif;"), "should contain endif: {}", php);
559 }
560
561 #[test]
562 fn test_preprocess_verbatim() {

Callers

nothing calls this directly

Calls 1

preprocessFunction · 0.85

Tested by

no test coverage detected