Initial clean version
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
require dirname(__DIR__).'/bootstrap.php';
|
||||
if(empty($argv[1]))exit("Usage : php tests/fmi.php CHEMIN_FMI_EXEMPLE.pdf\n");
|
||||
$f=App\Fmi::parse($argv[1]);
|
||||
if($f['fff_match_id']!=='79131186'||$f['team']!=='E1'||count($f['entries'])!==16)throw new RuntimeException('Composition incorrecte pour la FMI exemple');
|
||||
if(count(array_filter($f['entries'],fn($r)=>$r['suggested']==='1'))!==15)throw new RuntimeException('Participants incorrects');
|
||||
if(count(array_filter($f['entries'],fn($r)=>$r['starter']))!==11)throw new RuntimeException('Titulaires incorrects');
|
||||
$byPerson=array_column($f['entries'],null,'person_number');
|
||||
if($byPerson['2543123335']['suggested']!=='0')throw new RuntimeException('Remplaçant non entré incorrectement compté');
|
||||
echo "FMI exemple : 16 inscrits, 11 titulaires, 4 entrées, 1 non-participant.\n";
|
||||
Reference in New Issue
Block a user