65,7 → 65,7 |
case 'tout' : |
Debug::printr('Départ lancement test:'); |
$this->recupererDonnees(); |
$this->lancerTests(); |
$this->lancerTestsAuto(); |
break; |
case 'test11' : |
$this->recupererDonnees(); |
103,6 → 103,7 |
$resultats = array(); |
|
// Lancement des tests unitaires |
Debug::printr('Lancement des tests unitaires'); |
foreach (array_keys($this->tests) as $numero) { |
$info = $this->getInfosTest($numero); |
|
111,14 → 112,15 |
$resultats[] = $this->lancerTestUnitaire($info); |
} else if ($numero >= 5 && $this->verifierResultats($resultats)) { |
// Si la structure est bonne nous lançons les autres tests |
|
$this->lancerTestUnitaire($info); |
} |
} |
} |
|
public function lancerTestUnitaire($info) { |
Debug::printr($info['numero'].'::'.$info['methode']); |
$methodeDeTest = $info['methode']; |
$erreurs = $this->$methodeDeTest; |
$erreurs = $this->$methodeDeTest(); |
|
// Analyse des résultats |
if (isset($erreurs['special'])) { |
140,105 → 142,6 |
} |
} |
|
public function lancerTests() { |
// Lancement des tests unitaires |
$resultats = array(); |
$resultats[] = $this->testerNombreDeChamps(); |
$resultats[] = $this->testerNomDesChamps(); |
$resultats[] = $this->testerTypeDesChamps(); |
$resultats[] = $this->testerNumNomClePrimaire(); |
|
// Si la structure est bonne nous lançons les autres tests |
Debug::printr($resultats); |
if ($this->verifierResultats($resultats)) { |
$this->testerTailleDesChamps(); |
|
$this->testerNumNomSuperieurAZero(); |
|
$this->testerNumNomRetenuSuperieurAZero(); |
$this->testerNumTaxSupEgalZeroUnique(); |
$this->testerTaxSupPourTaxon(); |
$this->testerExitenceTaxonSuperieur(); |
$this->testerClassificationRang(); |
$this->testerClassification(); |
|
$this->testerRang(); |
|
$this->testerNomCompletSupraGenerique(); |
$this->testerNomCompletGenre(); |
$this->testerNomCompletInfraGenre(); |
$this->testerNomCompletEspece(); |
$this->testerNomCompletInfraSpecifique(); |
|
$this->testerNomSupraGeneriqueEspaces(); |
$this->testerNomSupraGeneriqueSyntaxe(); |
$this->testerNomSupraGeneriqueRang(); |
|
$this->testerGenreEspaces(); |
$this->testerGenreSyntaxe(); |
$this->testerGenreRang(); |
|
$this->testerEpitheteInfraGeneriqueEspaces(); |
$this->testerEpitheteInfraGeneriqueSyntaxe(); |
$this->testerEpitheteInfraGeneriqueRang(); |
|
$this->testerEpitheteSpEspaces(); |
$this->testerEpitheteSpSyntaxe(); |
$this->testerEpitheteSpRang(); |
|
$this->testerTypeEpitheteEspaces(); |
$this->testerTypeEpitheteSyntaxe(); |
$this->testerTypeEpitheteHybridite(); |
|
$this->testerEpitheteInfraSpEspaces(); |
$this->testerEpitheteInfraSpSyntaxe(); |
$this->testerEpitheteInfraSpRang(); |
|
$this->testerGroupeCultivarSyntaxe(); |
$this->testerGroupeCultivarRang(); |
|
$this->testerCultivarSyntaxe(); |
$this->testerCultivarRang(); |
|
$this->testerNomCommercialSyntaxe(); |
$this->testerNomCommercialPresenceCultivar(); |
|
$this->testerAuteurSyntaxe(); |
|
$this->testerAnneeSyntaxe(); |
|
$this->testerBiblioOrigineSyntaxe(); |
|
$this->testerHomonymieSyntaxe(); |
$this->testerHomonymieExistence(); |
|
$this->testerBasionymeSyntaxe(); |
$this->testerBasionymeExistence(); |
|
$this->testerSynonymeProparteSyntaxe(); |
$this->testerSynonymeProparteExistence(); |
|
$this->testerSynonymeDouteuxSyntaxe(); |
$this->testerSynonymeDouteuxNumNomRetenu(); |
|
$this->testerSynonymeMalAppliqueSyntaxe(); |
|
$this->testerSynonymeOrthographiqueSyntaxe(); |
$this->testerSynonymeOrthographiqueExistence(); |
|
$this->testerHybrideParent01Syntaxe(); |
$this->testerHybrideParent01Existence(); |
$this->testerHybrideParent02Syntaxe(); |
$this->testerHybrideParent02Existence(); |
|
$this->testerPresenceSyntaxe(); |
$this->testerStatutOrigineSyntaxe(); |
$this->testerStatutIntroductionSyntaxe(); |
$this->testerStatutCultureSyntaxe(); |
$this->testerExclureTaxRefSyntaxe(); |
} |
} |
|
private function verifierResultats($resultats) { |
$ok = true; |
foreach ($resultats as $resultat) { |
250,10 → 153,7 |
return $ok; |
} |
|
//+--------------------------------------------------------------------------------------------------------------+// |
// Enregistrement des résultats |
private function traiterResultatTest($info) { |
Debug::printr($info['nom']); |
if (isset($info['message'])) { |
if (is_array($info['message'])) { |
$info['message'] = $this->getVue('tests/squelettes/message_table', $info); |
394,7 → 294,6 |
* Test #06 |
*/ |
private function testerNumNomSuperieurAZero() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['num_nom'] <= 0) { |
408,7 → 307,6 |
* Test #07 |
*/ |
private function testerNumNomRetenuSuperieurAZero() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['num_nom_retenu'] != '' && $nom['num_nom_retenu'] <= 0) { |
422,7 → 320,6 |
* Test #08 |
*/ |
private function testerNumTaxSupEgalZeroUnique() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if (preg_match('/^0$/', $nom['num_tax_sup'])) { |
431,7 → 328,7 |
} |
// Ce test est spécial car le nombre de noms en erreurs doit être supérieur à 1 et non à 0 pour être KO. |
if (count($noms_erreur) == 1) { |
$noms_erreur[] = array(); |
$noms_erreur = array(); |
} |
return $noms_erreur; |
} |
440,7 → 337,6 |
* Test #09 |
*/ |
private function testerTaxSupPourTaxon() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['num_nom_retenu'] != $nom['num_nom'] && $nom['num_tax_sup'] != '') { |
454,7 → 350,6 |
* Test #10 |
*/ |
private function testerExitenceTaxonSuperieur() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['num_nom_retenu'] == $nom['num_nom']) { |
470,7 → 365,6 |
* Test #11 |
*/ |
private function testerClassificationRang() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['num_nom_retenu'] == $nom['num_nom']) { |
492,7 → 386,6 |
* Test #12 |
*/ |
private function testerClassification() { |
// Réalisation du test |
$noms_erreur = array(); |
$this->noms_ok = array(); |
foreach ($this->noms as &$nom) { |
561,7 → 454,6 |
* Test #14 |
*/ |
private function testerNomCompletSupraGenerique() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['rang'] < $this->manuel['rang_genre']) { |
581,7 → 473,6 |
* Test #15 |
*/ |
private function testerNomCompletGenre() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['rang'] == $this->manuel['rang_genre']) { |
601,7 → 492,6 |
* Test #16 |
*/ |
private function testerNomCompletInfraGenre() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['rang'] > $this->manuel['rang_genre'] && $nom['rang'] < $this->manuel['rang_sp']) { |
630,7 → 520,6 |
* Test #17 |
*/ |
private function testerNomCompletEspece() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['rang'] == $this->manuel['rang_sp']) { |
651,7 → 540,6 |
* Test #18 |
*/ |
private function testerNomCompletInfraSpecifique() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['rang'] > $this->manuel['rang_sp']) { |
674,7 → 562,6 |
* Test #19 |
*/ |
private function testerNomSupraGeneriqueEspaces() { |
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['nom_supra_generique'] != '') { |
691,9 → 578,6 |
* Test #20 |
*/ |
private function testerNomSupraGeneriqueSyntaxe() { |
$info = $this->getInfosTest(20); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['nom_supra_generique'] != '') { |
703,28 → 587,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_supra_generique erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #21 |
*/ |
private function testerNomSupraGeneriqueRang() { |
$info = $this->getInfosTest(21); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['nom_supra_generique'] != '') { |
733,26 → 602,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #22 |
*/ |
private function testerGenreEspaces() { |
$info = $this->getInfosTest(22); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['genre'] != '') { |
762,26 → 618,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'genre erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #23 |
*/ |
private function testerGenreSyntaxe() { |
$info = $this->getInfosTest(23); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['genre'] != '') { |
794,28 → 637,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'genre erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #24 |
*/ |
private function testerGenreRang() { |
$info = $this->getInfosTest(24); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['genre'] != '') { |
824,26 → 652,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #25 |
*/ |
private function testerEpitheteInfraGeneriqueSyntaxe() { |
$info = $this->getInfosTest(25); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_generique'] != '') { |
853,28 → 668,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_infra_generique erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #26 |
*/ |
private function testerEpitheteInfraGeneriqueRang() { |
$info = $this->getInfosTest(26); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre'], $this->manuel['rang_sp']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_genre'], $this->manuel['rang_sp']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_generique'] != '') { |
883,26 → 683,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #27 |
*/ |
private function testerEpitheteInfraGeneriqueEspaces() { |
$info = $this->getInfosTest(27); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_generique'] != '') { |
912,26 → 699,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_infra_generique erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #28 |
*/ |
private function testerEpitheteSpEspaces() { |
$info = $this->getInfosTest(28); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_sp'] != '') { |
941,26 → 715,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_sp erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #29 |
*/ |
private function testerEpitheteSpSyntaxe() { |
$info = $this->getInfosTest(29); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_sp'] != '') { |
973,28 → 734,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_sp erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #30 |
*/ |
private function testerEpitheteSpRang() { |
$info = $this->getInfosTest(30); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_sp']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_sp']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_sp'] != '') { |
1003,26 → 749,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #31 |
*/ |
private function testerTypeEpitheteEspaces() { |
$info = $this->getInfosTest(31); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['type_epithete'] != '') { |
1032,25 → 765,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'type_epithete erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #32 |
*/ |
private function testerTypeEpitheteSyntaxe() { |
$info = $this->getInfosTest(32); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['type_epithete'] != '') { |
1059,25 → 780,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'type_epithete erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #33 |
*/ |
private function testerTypeEpitheteHybridite() { |
$info = $this->getInfosTest(33); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['type_epithete'] != '') { |
1086,25 → 795,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'type_epithete erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #34 |
*/ |
private function testerEpitheteInfraSpEspaces() { |
$info = $this->getInfosTest(34); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_sp'] != '') { |
1114,26 → 811,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_infra_sp erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #35 |
*/ |
private function testerEpitheteInfraSpSyntaxe() { |
$info = $this->getInfosTest(35); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_sp'] != '') { |
1146,28 → 830,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'epithete_infra_sp erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #36 |
*/ |
private function testerEpitheteInfraSpRang() { |
$info = $this->getInfosTest(36); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_sp']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_sp']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['epithete_infra_sp'] != '') { |
1176,26 → 845,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #37 |
*/ |
private function testerGroupeCultivarSyntaxe() { |
$info = $this->getInfosTest(37); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['cultivar_groupe'] != '') { |
1205,28 → 861,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'cultivar_groupe erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #38 |
*/ |
private function testerGroupeCultivarRang() { |
$info = $this->getInfosTest(38); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['cultivar_groupe'] != '') { |
1235,26 → 876,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #39 |
*/ |
private function testerCultivarSyntaxe() { |
$info = $this->getInfosTest(39); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['cultivar'] != '') { |
1264,28 → 892,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'cultivar erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #40 |
*/ |
private function testerCultivarRang() { |
$info = $this->getInfosTest(40); |
$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']); |
$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['cultivar'] != '') { |
1294,26 → 907,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #41 |
*/ |
private function testerNomCommercialSyntaxe() { |
$info = $this->getInfosTest(41); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['nom_commercial'] != '') { |
1323,26 → 923,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'cultivar erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #42 |
*/ |
private function testerNomCommercialPresenceCultivar() { |
$info = $this->getInfosTest(42); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ((isset($nom['nom_commercial']) && $nom['nom_commercial'] != '') && ($nom['cultivar'] == '' && $nom['cultivar_groupe'] == '')) { |
1349,26 → 936,13 |
$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']); |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'nom_commercial sans cultivar ou cultivar_groupe'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #43 |
*/ |
private function testerAuteurSyntaxe() { |
$info = $this->getInfosTest(43); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['auteur'] != '') { |
1378,26 → 952,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'auteur erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #44 |
*/ |
private function testerAnneeSyntaxe() { |
$info = $this->getInfosTest(44); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['annee'] != '') { |
1406,26 → 967,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'annee erronée'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #45 |
*/ |
private function testerBiblioOrigineSyntaxe() { |
$info = $this->getInfosTest(45); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['biblio_origine'] != '') { |
1435,26 → 983,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'biblio_origine erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #46 |
*/ |
private function testerHomonymieSyntaxe() { |
$info = $this->getInfosTest(46); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['homonyme'] != '') { |
1463,28 → 998,15 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'homonyme erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #47 |
*/ |
private function testerHomonymieExistence() { |
$info = $this->getInfosTest(47); |
|
$noms_homonymie = $this->classerNomsParNomComplet(); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['homonyme'] != '0' && $nom['homonyme'] != '') { |
1494,26 → 1016,13 |
} |
} |
$noms_homonymie = null; |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'homonyme introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #48 |
*/ |
private function testerBasionymeSyntaxe() { |
$info = $this->getInfosTest(48); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['basionyme'] != '') { |
1522,26 → 1031,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'basionyme erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #49 |
*/ |
private function testerBasionymeExistence() { |
$info = $this->getInfosTest(49); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['basionyme'] != '') { |
1550,26 → 1046,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'basionyme introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #50 |
*/ |
private function testerSynonymeProparteSyntaxe() { |
$info = $this->getInfosTest(50); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_proparte'] != '') { |
1578,26 → 1061,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_proparte erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #51 |
*/ |
private function testerSynonymeProparteExistence() { |
$info = $this->getInfosTest(51); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_proparte'] != '') { |
1613,26 → 1083,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_proparte introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #52 |
*/ |
private function testerSynonymeDouteuxSyntaxe() { |
$info = $this->getInfosTest(52); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_douteux'] != '') { |
1641,26 → 1098,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_douteux erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #53 |
*/ |
private function testerSynonymeDouteuxNumNomRetenu() { |
$info = $this->getInfosTest(53); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_douteux'] == 1 && $nom['num_nom_retenu'] != ' ') { |
1667,25 → 1111,13 |
$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux'], $nom['num_nom_retenu']); |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_douteux', 'num_nom_retenu'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #54 |
*/ |
private function testerSynonymeMalAppliqueSyntaxe() { |
$info = $this->getInfosTest(54); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_mal_applique'] != '') { |
1694,26 → 1126,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_mal_applique erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #55 |
*/ |
private function testerSynonymeOrthographiqueSyntaxe() { |
$info = $this->getInfosTest(55); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as $nom) { |
if ($nom['synonyme_orthographique'] != '') { |
1722,26 → 1141,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_orthographique erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #56 |
*/ |
private function testerSynonymeOrthographiqueExistence() { |
$info = $this->getInfosTest(56); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['synonyme_orthographique'] != '') { |
1750,26 → 1156,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'synonyme_orthographique introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #57 |
*/ |
private function testerHybrideParent01Syntaxe() { |
$info = $this->getInfosTest(57); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['hybride_parent_01'] != '') { |
1778,26 → 1171,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'hybride_parent_01 erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #58 |
*/ |
private function testerHybrideParent01Existence() { |
$info = $this->getInfosTest(58); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['hybride_parent_01'] != '' && $nom['hybride_parent_01'] != '0') { |
1806,26 → 1186,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'hybride_parent_01 introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #59 |
*/ |
private function testerHybrideParent02Syntaxe() { |
$info = $this->getInfosTest(59); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['hybride_parent_02'] != '') { |
1834,26 → 1201,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'hybride_parent_02 erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #60 |
*/ |
private function testerHybrideParent02Existence() { |
$info = $this->getInfosTest(60); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['hybride_parent_02'] != '') { |
1862,26 → 1216,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'hybride_parent_02 introuvable'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #61 |
*/ |
private function testerPresenceSyntaxe() { |
$info = $this->getInfosTest(61); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['presence'] != '') { |
1890,26 → 1231,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'presence erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #62 |
*/ |
private function testerStatutOrigineSyntaxe() { |
$info = $this->getInfosTest(62); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['statut_origine'] != '') { |
1918,26 → 1246,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'statut_origine erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #63 |
*/ |
private function testerStatutIntroductionSyntaxe() { |
$info = $this->getInfosTest(63); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['statut_introduction'] != '') { |
1946,26 → 1261,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'statut_introduction erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #64 |
*/ |
private function testerStatutCultureSyntaxe() { |
$info = $this->getInfosTest(64); |
|
// Réalisation du test |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['statut_culture'] != '') { |
1974,26 → 1276,13 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'statut_culture erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
/** |
* Test #65 |
*/ |
private function testerExclureTaxRefSyntaxe() { |
$info = $this->getInfosTest(65); |
|
// Réalisation du testCe n'est pas programmé. |
$noms_erreur = array(); |
foreach ($this->noms as &$nom) { |
if ($nom['exclure_taxref'] != '' && $nom['exclure_taxref'] != null) { |
2002,21 → 1291,11 |
} |
} |
} |
|
// Analyse des résultats |
if (count($noms_erreur) > 0) { |
$info['message']['entete'] = array('num_nom', 'exclure_taxref erroné'); |
$info['message']['lignes'] = $noms_erreur; |
} else { |
$info['resultat'] = true; |
return $noms_erreur; |
} |
$noms_erreur = null; |
|
$this->traiterResultatTest($info); |
} |
|
|
|
//+--------------------------------------------------------------------------------------------------------------+// |
// MÉTHODES COMMUNES aux TESTS |
|