Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 177 → Rev 176

/trunk/scripts/modules/tests/Tests.php
65,7 → 65,7
case 'tout' :
Debug::printr('Départ lancement test:');
$this->recupererDonnees();
$this->lancerTestsAuto();
$this->lancerTests();
break;
case 'test11' :
$this->recupererDonnees();
103,7 → 103,6
$resultats = array();
 
// Lancement des tests unitaires
Debug::printr('Lancement des tests unitaires');
foreach (array_keys($this->tests) as $numero) {
$info = $this->getInfosTest($numero);
112,15 → 111,14
$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();
$methodeDeTest = $info['methode'];
$erreurs = $this->$methodeDeTest;
// Analyse des résultats
if (isset($erreurs['special'])) {
141,7 → 139,106
return ($info['resultat'] ? '1' : '0');
}
}
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) {
153,7 → 250,10
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);
294,6 → 394,7
* Test #06
*/
private function testerNumNomSuperieurAZero() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['num_nom'] <= 0) {
307,6 → 408,7
* 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) {
320,6 → 422,7
* 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'])) {
328,7 → 431,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;
}
337,6 → 440,7
* 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'] != '') {
350,6 → 454,7
* 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']) {
365,6 → 470,7
* 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']) {
386,6 → 492,7
* Test #12
*/
private function testerClassification() {
// Réalisation du test
$noms_erreur = array();
$this->noms_ok = array();
foreach ($this->noms as &$nom) {
454,6 → 561,7
* Test #14
*/
private function testerNomCompletSupraGenerique() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['rang'] < $this->manuel['rang_genre']) {
473,6 → 581,7
* Test #15
*/
private function testerNomCompletGenre() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['rang'] == $this->manuel['rang_genre']) {
492,6 → 601,7
* 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']) {
520,6 → 630,7
* Test #17
*/
private function testerNomCompletEspece() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['rang'] == $this->manuel['rang_sp']) {
540,6 → 651,7
* Test #18
*/
private function testerNomCompletInfraSpecifique() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['rang'] > $this->manuel['rang_sp']) {
562,6 → 674,7
* Test #19
*/
private function testerNomSupraGeneriqueEspaces() {
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['nom_supra_generique'] != '') {
578,6 → 691,9
* 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'] != '') {
587,7 → 703,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
594,6 → 720,11
* 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'] != '') {
602,7 → 733,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
609,6 → 750,9
* Test #22
*/
private function testerGenreEspaces() {
$info = $this->getInfosTest(22);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['genre'] != '') {
618,7 → 762,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
625,6 → 779,9
* Test #23
*/
private function testerGenreSyntaxe() {
$info = $this->getInfosTest(23);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['genre'] != '') {
637,7 → 794,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
644,6 → 811,11
* 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'] != '') {
652,7 → 824,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
659,6 → 841,9
* 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'] != '') {
668,7 → 853,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
675,6 → 870,11
* 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'] != '') {
683,7 → 883,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
690,6 → 900,9
* 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'] != '') {
699,7 → 912,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
706,6 → 929,9
* 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'] != '') {
715,7 → 941,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
722,6 → 958,9
* 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'] != '') {
734,7 → 973,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
741,6 → 990,11
* 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'] != '') {
749,7 → 1003,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
756,6 → 1020,9
* 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'] != '') {
765,7 → 1032,16
}
}
}
return $noms_erreur;
// 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;
}
$this->traiterResultatTest($info);
}
/**
772,6 → 1048,9
* 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'] != '') {
780,7 → 1059,16
}
}
}
return $noms_erreur;
// 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;
}
$this->traiterResultatTest($info);
}
/**
787,6 → 1075,9
* 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'] != '') {
795,7 → 1086,16
}
}
}
return $noms_erreur;
// 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;
}
$this->traiterResultatTest($info);
}
/**
802,6 → 1102,9
* 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'] != '') {
811,7 → 1114,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
818,6 → 1131,9
* 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'] != '') {
830,7 → 1146,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
837,6 → 1163,11
* 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'] != '') {
845,7 → 1176,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
852,6 → 1193,9
* 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'] != '') {
861,7 → 1205,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
868,6 → 1222,11
* 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'] != '') {
876,7 → 1235,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
883,6 → 1252,9
* Test #39
*/
private function testerCultivarSyntaxe() {
$info = $this->getInfosTest(39);
 
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['cultivar'] != '') {
892,7 → 1264,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
899,6 → 1281,11
* 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'] != '') {
907,7 → 1294,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
914,6 → 1311,9
* 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'] != '') {
923,7 → 1323,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
930,6 → 1340,9
* 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'] == '')) {
936,7 → 1349,17
$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']);
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
943,6 → 1366,9
* Test #43
*/
private function testerAuteurSyntaxe() {
$info = $this->getInfosTest(43);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['auteur'] != '') {
952,7 → 1378,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
959,6 → 1395,9
* Test #44
*/
private function testerAnneeSyntaxe() {
$info = $this->getInfosTest(44);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['annee'] != '') {
967,7 → 1406,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
974,6 → 1423,9
* 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'] != '') {
983,7 → 1435,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
990,6 → 1452,9
* Test #46
*/
private function testerHomonymieSyntaxe() {
$info = $this->getInfosTest(46);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['homonyme'] != '') {
998,7 → 1463,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1005,8 → 1480,11
* 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'] != '') {
1016,7 → 1494,17
}
}
$noms_homonymie = null;
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1023,6 → 1511,9
* Test #48
*/
private function testerBasionymeSyntaxe() {
$info = $this->getInfosTest(48);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['basionyme'] != '') {
1031,7 → 1522,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
 
/**
1038,6 → 1539,9
* Test #49
*/
private function testerBasionymeExistence() {
$info = $this->getInfosTest(49);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['basionyme'] != '') {
1046,7 → 1550,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1053,6 → 1567,9
* 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'] != '') {
1061,7 → 1578,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1068,6 → 1595,9
* 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'] != '') {
1083,7 → 1613,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1090,6 → 1630,9
* 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'] != '') {
1098,7 → 1641,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1105,6 → 1658,9
* 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'] != ' ') {
1111,7 → 1667,16
$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux'], $nom['num_nom_retenu']);
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1118,6 → 1683,9
* 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'] != '') {
1126,7 → 1694,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1133,6 → 1711,9
* 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'] != '') {
1141,7 → 1722,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1148,6 → 1739,9
* 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'] != '') {
1156,7 → 1750,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1163,6 → 1767,9
* 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'] != '') {
1171,7 → 1778,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1178,6 → 1795,9
* 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') {
1186,7 → 1806,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1193,6 → 1823,9
* 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'] != '') {
1201,7 → 1834,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1208,6 → 1851,9
* 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'] != '') {
1216,7 → 1862,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1223,6 → 1879,9
* Test #61
*/
private function testerPresenceSyntaxe() {
$info = $this->getInfosTest(61);
// Réalisation du test
$noms_erreur = array();
foreach ($this->noms as &$nom) {
if ($nom['presence'] != '') {
1231,7 → 1890,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1238,6 → 1907,9
* 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'] != '') {
1246,7 → 1918,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1253,6 → 1935,9
* 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'] != '') {
1261,7 → 1946,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1268,6 → 1963,9
* 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'] != '') {
1276,7 → 1974,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}
/**
1283,6 → 1991,9
* 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) {
1291,7 → 2002,17
}
}
}
return $noms_erreur;
// 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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
}