()
| 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() { |
nothing calls this directly
no test coverage detected