()
| 498 | |
| 499 | #[test] |
| 500 | fn test_preprocess_foreach() { |
| 501 | let content = r#"@php |
| 502 | /** |
| 503 | * @var \App\Models\AuthorCollection $users |
| 504 | */ |
| 505 | @endphp |
| 506 | |
| 507 | @foreach($users->active()->byName() as $user) |
| 508 | <p>{{ $user->name }}</p> |
| 509 | @endforeach |
| 510 | "#; |
| 511 | let (php, _) = preprocess(content); |
| 512 | for (i, line) in php.lines().enumerate() { |
| 513 | eprintln!("{:2}: {}", i, line); |
| 514 | } |
| 515 | assert!(php.contains("$user->name")); |
| 516 | } |
| 517 | |
| 518 | #[test] |
| 519 | fn test_preprocess_forelse() { |
nothing calls this directly
no test coverage detected