Subversion Repositories Applications.referentiel

Compare Revisions

Ignore whitespace Rev 176 → Rev 177

/trunk/scripts/modules/tests/Tests.php
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) {
$methodeDeTest = $info['methode'];
$erreurs = $this->$methodeDeTest;
Debug::printr($info['numero'].'::'.$info['methode']);
$methodeDeTest = $info['methode'];
$erreurs = $this->$methodeDeTest();
// Analyse des résultats
if (isset($erreurs['special'])) {
139,106 → 141,7
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) {
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,17 → 587,7
}
}
}
// 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);
return $noms_erreur;
}
/**
720,11 → 594,6
* 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,17 → 602,7
}
}
}
// 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);
return $noms_erreur;
}
/**
750,9 → 609,6
* 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,17 → 618,7
}
}
}
// 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);
return $noms_erreur;
}
/**
779,9 → 625,6
* 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,17 → 637,7
}
}
}
// 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);
return $noms_erreur;
}
/**
811,11 → 644,6
* 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,17 → 652,7
}
}
}
// 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);
return $noms_erreur;
}
/**
841,9 → 659,6
* 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,17 → 668,7
}
}
}
// 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);
return $noms_erreur;
}
/**
870,11 → 675,6
* 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,17 → 683,7
}
}
}
// 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);
return $noms_erreur;
}
/**
900,9 → 690,6
* 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,17 → 699,7
}
}
}
// 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);
return $noms_erreur;
}
/**
929,9 → 706,6
* 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,17 → 715,7
}
}
}
// 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);
return $noms_erreur;
}
/**
958,9 → 722,6
* 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,17 → 734,7
}
}
}
// 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);
return $noms_erreur;
}
/**
990,11 → 741,6
* 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,17 → 749,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1020,9 → 756,6
* 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,16 → 765,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1048,9 → 772,6
* 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,16 → 780,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1075,9 → 787,6
* 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,16 → 795,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1102,9 → 802,6
* 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,17 → 811,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1131,9 → 818,6
* 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,17 → 830,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1163,11 → 837,6
* 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,17 → 845,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1193,9 → 852,6
* 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,17 → 861,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1222,11 → 868,6
* 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,17 → 876,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1252,9 → 883,6
* 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,17 → 892,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1281,11 → 899,6
* 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,17 → 907,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1311,9 → 914,6
* 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,17 → 923,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1340,9 → 930,6
* 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,17 → 936,7
$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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
return $noms_erreur;
}
/**
1366,9 → 943,6
* 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,17 → 952,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1395,9 → 959,6
* 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,17 → 967,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1423,9 → 974,6
* 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,17 → 983,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1452,9 → 990,6
* 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,17 → 998,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1480,11 → 1005,8
* 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,17 → 1016,7
}
}
$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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
return $noms_erreur;
}
/**
1511,9 → 1023,6
* 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,17 → 1031,7
}
}
}
// 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);
return $noms_erreur;
}
 
/**
1539,9 → 1038,6
* 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,17 → 1046,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1567,9 → 1053,6
* 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,17 → 1061,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1595,9 → 1068,6
* 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,17 → 1083,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1630,9 → 1090,6
* 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,17 → 1098,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1658,9 → 1105,6
* 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,16 → 1111,7
$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;
}
$noms_erreur = null;
$this->traiterResultatTest($info);
return $noms_erreur;
}
/**
1683,9 → 1118,6
* 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,17 → 1126,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1711,9 → 1133,6
* 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,17 → 1141,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1739,9 → 1148,6
* 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,17 → 1156,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1767,9 → 1163,6
* 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,17 → 1171,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1795,9 → 1178,6
* 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,17 → 1186,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1823,9 → 1193,6
* 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,17 → 1201,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1851,9 → 1208,6
* 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,17 → 1216,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1879,9 → 1223,6
* 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,17 → 1231,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1907,9 → 1238,6
* 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,17 → 1246,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1935,9 → 1253,6
* 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,17 → 1261,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1963,9 → 1268,6
* 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,17 → 1276,7
}
}
}
// 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);
return $noms_erreur;
}
/**
1991,9 → 1283,6
* 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,17 → 1291,7
}
}
}
// 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);
return $noms_erreur;
}