$week,'end'=>'2026-10-04','groups'=>[],'missing'=>[['id'=>$id,'last_name'=>'TEST','first_name'=>'Spond','discipline'=>[]]],'availability'=>[]]; function renderConvocations(array $summary,?array $provided=null):string{ $_SESSION['csrf']='test-token';$user=['role'=>'viewer'];if($provided!==null)$spond=$provided; ob_start();try{require dirname(__DIR__).'/templates/convocations.php';return ob_get_contents();}finally{ob_end_clean();} } if(!str_contains(renderConvocations($summary),'Spond : Non renseigné'))throw new RuntimeException('Sans import'); \App\DB::$rows=[['player_id'=>1,'match_id'=>null,'status'=>'present','responded_at'=>null,'imported_at'=>'2026-10-02 14:00:00']]; if(!str_contains(renderConvocations($summary),'Spond : Présent'))throw new RuntimeException('Disponibilité non chargée'); $given=[$id=>['status'=>'absent','answers'=>[]]]; if(!str_contains(renderConvocations($summary,$given),'Spond : Absent'))throw new RuntimeException('Contexte fourni non conservé'); echo "OK : variable absente sans import, avec réponse, et contexte fourni. Aucun avertissement PHP.\n"; }