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

Function test_preprocess_error_directive

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

Source from the content-addressed store, hash-verified

597
598 #[test]
599 fn test_preprocess_error_directive() {
600 let content = "@error('email')\n <p>{{ $message }}</p>\n@enderror\n";
601 let (php, _) = preprocess(content);
602 assert!(
603 php.contains("if (true)"),
604 "should contain if (true): {}",
605 php
606 );
607 assert!(
608 php.contains("$message = '';"),
609 "should inject $message: {}",
610 php
611 );
612 assert!(php.contains("endif;"), "should contain endif: {}", php);
613 }
614
615 #[test]
616 fn test_preprocess_context_directive() {

Callers

nothing calls this directly

Calls 1

preprocessFunction · 0.85

Tested by

no test coverage detected