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