Corrige les statuts et les codes internes
This commit is contained in:
parent
6bda723f22
commit
a21f3f2bb4
7 changed files with 56 additions and 22 deletions
|
|
@ -474,6 +474,16 @@ try {
|
|||
}
|
||||
}
|
||||
});
|
||||
$test('Le statut visible d’une fiche animale est bien envoyé au serveur', function () use ($root, $assert): void {
|
||||
$form = file_get_contents($root . '/app/Views/animal_form.php');
|
||||
$assert($form !== false, 'Formulaire animal illisible');
|
||||
$assert(str_contains($form, 'name="status" id="status"'), 'Le sélecteur de statut ne porte pas le nom attendu');
|
||||
$assert(!str_contains($form, 'name="status_display"'), 'Ancien nom de champ encore présent');
|
||||
});
|
||||
$test('Les noms accentués produisent un code interne lisible', function () use ($assert): void {
|
||||
$assert(Ids::slugifyUpper('Gérard') === 'GERARD', 'La translittération de Gérard a échoué');
|
||||
$assert(Ids::slugifyUpper('Éléonore Ça') === 'ELEONORE-CA', 'La translittération des accents a échoué');
|
||||
});
|
||||
$test('La démonstration installe une fiche Twix complète', function () use ($db, $root, $assert): void {
|
||||
DemoDataService::reset($db);
|
||||
$summary = DemoDataService::seed($db, Auth::id());
|
||||
|
|
|
|||
Loading…
Reference in a new issue