Subversion Repositories Applications.referentiel

Rev

Rev 176 | Rev 183 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 176 Rev 177
Line 63... Line 63...
63
			$cmd = $this->getParam('a');
63
			$cmd = $this->getParam('a');
64
	    	switch ($cmd) {
64
	    	switch ($cmd) {
65
				case 'tout' :
65
				case 'tout' :
66
					Debug::printr('Départ lancement test:');
66
					Debug::printr('Départ lancement test:');
67
					$this->recupererDonnees();
67
					$this->recupererDonnees();
68
					$this->lancerTests();
68
					$this->lancerTestsAuto();
69
					break;
69
					break;
70
				case 'test11' :
70
				case 'test11' :
71
					$this->recupererDonnees();
71
					$this->recupererDonnees();
72
					Debug::printr('Départ lancement test 11 :');
72
					Debug::printr('Départ lancement test 11 :');
73
					$this->testerClassificationRang();
73
					$this->testerClassificationRang();
Line 101... Line 101...
101
    
101
    
102
    public function lancerTestsAuto() {
102
    public function lancerTestsAuto() {
Line 103... Line 103...
103
		$resultats = array();
103
		$resultats = array();
-
 
104
 
104
 
105
		// Lancement des tests unitaires
105
		// Lancement des tests unitaires
106
		Debug::printr('Lancement des tests unitaires');
Line 106... Line 107...
106
    	foreach (array_keys($this->tests) as $numero) {
107
    	foreach (array_keys($this->tests) as $numero) {
107
			$info = $this->getInfosTest($numero);
108
			$info = $this->getInfosTest($numero);
108
    		
109
    		
109
    		if ($numero < 5) {
110
    		if ($numero < 5) {
110
    			// Tests spéciaux vérifiant la structure de la table
111
    			// Tests spéciaux vérifiant la structure de la table
111
    			$resultats[] = $this->lancerTestUnitaire($info);
-
 
-
 
112
    			$resultats[] = $this->lancerTestUnitaire($info);
112
    		} else if ($numero >= 5 && $this->verifierResultats($resultats)) {		
113
    		} else if ($numero >= 5 && $this->verifierResultats($resultats)) {		
113
				// Si la structure est bonne nous lançons les autres tests
114
				// Si la structure est bonne nous lançons les autres tests
114
				
115
				$this->lancerTestUnitaire($info);
Line 115... Line 116...
115
    		}
116
    		}
-
 
117
		}
116
		}
118
    }
117
    }
119
    
Line 118... Line 120...
118
    
120
    public function lancerTestUnitaire($info) {
119
    public function lancerTestUnitaire($info) {
121
		Debug::printr($info['numero'].'::'.$info['methode']);
120
		$methodeDeTest = $info['methode'];
122
    	$methodeDeTest = $info['methode'];
121
    	$erreurs = $this->$methodeDeTest;
123
    	$erreurs = $this->$methodeDeTest();
Line 137... Line 139...
137
		
139
		
138
		if ($info['numero'] < 5) {
140
		if ($info['numero'] < 5) {
139
			return ($info['resultat'] ? '1' : '0');
141
			return ($info['resultat'] ? '1' : '0');
140
		}
142
		}
141
    }
-
 
142
    
-
 
143
    public function lancerTests() {
-
 
144
		// Lancement des tests unitaires
-
 
145
		$resultats = array();
-
 
146
		$resultats[] = $this->testerNombreDeChamps();
-
 
147
		$resultats[] = $this->testerNomDesChamps();
-
 
148
		$resultats[] = $this->testerTypeDesChamps();
-
 
149
		$resultats[] = $this->testerNumNomClePrimaire();
-
 
150
		
-
 
151
		// Si la structure est bonne nous lançons les autres tests
-
 
152
		Debug::printr($resultats);
-
 
153
		if ($this->verifierResultats($resultats)) {
-
 
154
			$this->testerTailleDesChamps();
-
 
155
			
-
 
156
			$this->testerNumNomSuperieurAZero();
-
 
157
			
-
 
158
			$this->testerNumNomRetenuSuperieurAZero();
-
 
159
			$this->testerNumTaxSupEgalZeroUnique();
-
 
160
			$this->testerTaxSupPourTaxon();
-
 
161
			$this->testerExitenceTaxonSuperieur();
-
 
162
			$this->testerClassificationRang();	
-
 
163
			$this->testerClassification();
-
 
164
			
-
 
165
			$this->testerRang();
-
 
166
			
-
 
167
			$this->testerNomCompletSupraGenerique();
-
 
168
			$this->testerNomCompletGenre();
-
 
169
			$this->testerNomCompletInfraGenre();
-
 
170
			$this->testerNomCompletEspece();
-
 
171
			$this->testerNomCompletInfraSpecifique();
-
 
172
	
-
 
173
			$this->testerNomSupraGeneriqueEspaces();
-
 
174
			$this->testerNomSupraGeneriqueSyntaxe();
-
 
175
			$this->testerNomSupraGeneriqueRang();
-
 
176
			
-
 
177
			$this->testerGenreEspaces();
-
 
178
			$this->testerGenreSyntaxe();
-
 
179
			$this->testerGenreRang();
-
 
180
			
-
 
181
			$this->testerEpitheteInfraGeneriqueEspaces();
-
 
182
			$this->testerEpitheteInfraGeneriqueSyntaxe();
-
 
183
			$this->testerEpitheteInfraGeneriqueRang();
-
 
184
			
-
 
185
			$this->testerEpitheteSpEspaces();
-
 
186
			$this->testerEpitheteSpSyntaxe();
-
 
187
			$this->testerEpitheteSpRang();
-
 
188
			
-
 
189
			$this->testerTypeEpitheteEspaces();
-
 
190
			$this->testerTypeEpitheteSyntaxe();
-
 
191
			$this->testerTypeEpitheteHybridite();
-
 
192
			
-
 
193
			$this->testerEpitheteInfraSpEspaces();
-
 
194
			$this->testerEpitheteInfraSpSyntaxe();
-
 
195
			$this->testerEpitheteInfraSpRang();
-
 
196
			
-
 
197
			$this->testerGroupeCultivarSyntaxe();
-
 
198
			$this->testerGroupeCultivarRang();		
-
 
199
			
-
 
200
			$this->testerCultivarSyntaxe();
-
 
201
			$this->testerCultivarRang();
-
 
202
			
-
 
203
			$this->testerNomCommercialSyntaxe();
-
 
204
			$this->testerNomCommercialPresenceCultivar();
-
 
205
			
-
 
206
			$this->testerAuteurSyntaxe();
-
 
207
			
-
 
208
			$this->testerAnneeSyntaxe();
-
 
209
			
-
 
210
			$this->testerBiblioOrigineSyntaxe();
-
 
211
			
-
 
212
			$this->testerHomonymieSyntaxe();
-
 
213
			$this->testerHomonymieExistence();
-
 
214
			
-
 
215
			$this->testerBasionymeSyntaxe();
-
 
216
			$this->testerBasionymeExistence();
-
 
217
			
-
 
218
			$this->testerSynonymeProparteSyntaxe();
-
 
219
			$this->testerSynonymeProparteExistence();
-
 
220
			
-
 
221
			$this->testerSynonymeDouteuxSyntaxe();
-
 
222
			$this->testerSynonymeDouteuxNumNomRetenu();
-
 
223
			
-
 
224
			$this->testerSynonymeMalAppliqueSyntaxe();
-
 
225
			
-
 
226
			$this->testerSynonymeOrthographiqueSyntaxe();
-
 
227
			$this->testerSynonymeOrthographiqueExistence();
-
 
228
			
-
 
229
			$this->testerHybrideParent01Syntaxe();
-
 
230
			$this->testerHybrideParent01Existence();
-
 
231
			$this->testerHybrideParent02Syntaxe();
-
 
232
			$this->testerHybrideParent02Existence();
-
 
233
			
-
 
234
			$this->testerPresenceSyntaxe();
-
 
235
			$this->testerStatutOrigineSyntaxe();
-
 
236
			$this->testerStatutIntroductionSyntaxe();
-
 
237
			$this->testerStatutCultureSyntaxe();
-
 
238
			$this->testerExclureTaxRefSyntaxe();
-
 
239
		}
-
 
Line 240... Line 143...
240
	}
143
    }
241
	
144
	
242
	private function verifierResultats($resultats) {
145
	private function verifierResultats($resultats) {
243
		$ok = true;
146
		$ok = true;
Line 248... Line 151...
248
			}
151
			}
249
		}
152
		}
250
		return $ok;
153
		return $ok;
251
	}
154
	}
Line 252... Line -...
252
	
-
 
253
	//+--------------------------------------------------------------------------------------------------------------+//
-
 
254
	// Enregistrement des résultats
155
	
255
	private function traiterResultatTest($info) {
-
 
256
		Debug::printr($info['nom']);
156
	private function traiterResultatTest($info) {
257
		if (isset($info['message'])) {
157
		if (isset($info['message'])) {
258
			if (is_array($info['message'])) {
158
			if (is_array($info['message'])) {
259
				$info['message'] = $this->getVue('tests/squelettes/message_table', $info);
159
				$info['message'] = $this->getVue('tests/squelettes/message_table', $info);
260
			} else {
160
			} else {
Line 392... Line 292...
392
		
292
		
393
	/**
293
	/**
394
	 * Test #06
294
	 * Test #06
395
	 */
295
	 */
396
	private function testerNumNomSuperieurAZero() {
-
 
397
		// Réalisation du test
296
	private function testerNumNomSuperieurAZero() {
398
		$noms_erreur = array();
297
		$noms_erreur = array();
399
		foreach ($this->noms as &$nom) {
298
		foreach ($this->noms as &$nom) {
400
			if ($nom['num_nom'] <= 0) {
299
			if ($nom['num_nom'] <= 0) {
401
				$noms_erreur[] = array($nom['num_nom']);
300
				$noms_erreur[] = array($nom['num_nom']);
Line 406... Line 305...
406
	
305
	
407
	/**
306
	/**
408
	 * Test #07
307
	 * Test #07
409
	 */
308
	 */
410
	private function testerNumNomRetenuSuperieurAZero() {
-
 
411
		// Réalisation du test
309
	private function testerNumNomRetenuSuperieurAZero() {
412
		$noms_erreur = array();
310
		$noms_erreur = array();
413
		foreach ($this->noms as &$nom) {
311
		foreach ($this->noms as &$nom) {
414
			if ($nom['num_nom_retenu'] != '' && $nom['num_nom_retenu'] <= 0) {
312
			if ($nom['num_nom_retenu'] != '' && $nom['num_nom_retenu'] <= 0) {
415
				$noms_erreur[] = array($nom['num_nom'], $nom['num_nom_retenu']);
313
				$noms_erreur[] = array($nom['num_nom'], $nom['num_nom_retenu']);
Line 420... Line 318...
420
	
318
	
421
	/**
319
	/**
422
	 * Test #08
320
	 * Test #08
423
	 */
321
	 */
424
	private function testerNumTaxSupEgalZeroUnique() {
-
 
425
		// Réalisation du test
322
	private function testerNumTaxSupEgalZeroUnique() {
426
		$noms_erreur = array();
323
		$noms_erreur = array();
427
		foreach ($this->noms as &$nom) {
324
		foreach ($this->noms as &$nom) {
428
			if (preg_match('/^0$/', $nom['num_tax_sup'])) {
325
			if (preg_match('/^0$/', $nom['num_tax_sup'])) {
429
				$noms_erreur[] = array($nom['num_nom'], $nom['num_tax_sup']);
326
				$noms_erreur[] = array($nom['num_nom'], $nom['num_tax_sup']);
430
			}
327
			}
431
		}
328
		}
432
		// Ce test est spécial car le nombre de noms en erreurs doit être supérieur à 1 et non à 0 pour être KO.
329
		// Ce test est spécial car le nombre de noms en erreurs doit être supérieur à 1 et non à 0 pour être KO.
433
		if (count($noms_erreur) == 1) {
330
		if (count($noms_erreur) == 1) {
434
			$noms_erreur[] = array();
331
			$noms_erreur = array();
435
		}
332
		}
436
		return $noms_erreur;
333
		return $noms_erreur;
Line 437... Line 334...
437
	}
334
	}
438
	
335
	
439
	/**
336
	/**
440
	 * Test #09
337
	 * Test #09
441
	 */
-
 
442
	private function testerTaxSupPourTaxon() {
338
	 */
443
		// Réalisation du test
339
	private function testerTaxSupPourTaxon() {
444
		$noms_erreur = array();
340
		$noms_erreur = array();
445
		foreach ($this->noms as &$nom) {
341
		foreach ($this->noms as &$nom) {
446
			if ($nom['num_nom_retenu'] != $nom['num_nom'] && $nom['num_tax_sup'] != '') {
342
			if ($nom['num_nom_retenu'] != $nom['num_nom'] && $nom['num_tax_sup'] != '') {
Line 452... Line 348...
452
	
348
	
453
	/**
349
	/**
454
	 * Test #10
350
	 * Test #10
455
	 */
351
	 */
456
	private function testerExitenceTaxonSuperieur() {
-
 
457
		// Réalisation du test
352
	private function testerExitenceTaxonSuperieur() {
458
		$noms_erreur = array();
353
		$noms_erreur = array();
459
		foreach ($this->noms as &$nom) {
354
		foreach ($this->noms as &$nom) {
460
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
355
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
461
				if ($nom['num_tax_sup'] != 0 && !isset($this->noms[$nom['num_tax_sup']])) {
356
				if ($nom['num_tax_sup'] != 0 && !isset($this->noms[$nom['num_tax_sup']])) {
Line 468... Line 363...
468
	
363
	
469
	/**
364
	/**
470
	 * Test #11
365
	 * Test #11
471
	 */
366
	 */
472
	private function testerClassificationRang() {
-
 
473
		// Réalisation du test
367
	private function testerClassificationRang() {
474
		$noms_erreur = array();
368
		$noms_erreur = array();
475
		foreach ($this->noms as &$nom) {
369
		foreach ($this->noms as &$nom) {
476
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
370
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
477
				if (isset($this->noms[$nom['num_tax_sup']])) {
371
				if (isset($this->noms[$nom['num_tax_sup']])) {
Line 490... Line 384...
490
	
384
	
491
	/**
385
	/**
492
	 * Test #12
386
	 * Test #12
493
	 */
387
	 */
494
	private function testerClassification() {
-
 
495
		// Réalisation du test
388
	private function testerClassification() {
496
		$noms_erreur = array();
389
		$noms_erreur = array();
497
		$this->noms_ok = array();
390
		$this->noms_ok = array();
498
		foreach ($this->noms as &$nom) {
391
		foreach ($this->noms as &$nom) {
499
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
392
			if ($nom['num_nom_retenu'] == $nom['num_nom']) {
Line 559... Line 452...
559
	
452
	
560
	/**
453
	/**
561
	 * Test #14
454
	 * Test #14
562
	 */
455
	 */
563
	private function testerNomCompletSupraGenerique() {
-
 
564
		// Réalisation du test
456
	private function testerNomCompletSupraGenerique() {
565
		$noms_erreur = array();
457
		$noms_erreur = array();
566
		foreach ($this->noms as &$nom) {
458
		foreach ($this->noms as &$nom) {
567
			if ($nom['rang'] < $this->manuel['rang_genre']) {
459
			if ($nom['rang'] < $this->manuel['rang_genre']) {
568
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
460
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
Line 579... Line 471...
579
	
471
	
580
	/**
472
	/**
581
	 * Test #15
473
	 * Test #15
582
	 */
474
	 */
583
	private function testerNomCompletGenre() {
-
 
584
		// Réalisation du test
475
	private function testerNomCompletGenre() {
585
		$noms_erreur = array();
476
		$noms_erreur = array();
586
		foreach ($this->noms as &$nom) {
477
		foreach ($this->noms as &$nom) {
587
			if ($nom['rang'] == $this->manuel['rang_genre']) {
478
			if ($nom['rang'] == $this->manuel['rang_genre']) {
588
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
479
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
Line 599... Line 490...
599
	
490
	
600
	/**
491
	/**
601
	 * Test #16
492
	 * Test #16
602
	 */
493
	 */
603
	private function testerNomCompletInfraGenre() {
-
 
604
		// Réalisation du test
494
	private function testerNomCompletInfraGenre() {
605
		$noms_erreur = array();
495
		$noms_erreur = array();
606
		foreach ($this->noms as &$nom) {
496
		foreach ($this->noms as &$nom) {
607
			if ($nom['rang'] > $this->manuel['rang_genre'] && $nom['rang'] < $this->manuel['rang_sp']) {
497
			if ($nom['rang'] > $this->manuel['rang_genre'] && $nom['rang'] < $this->manuel['rang_sp']) {
608
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
498
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
Line 628... Line 518...
628
	
518
	
629
	/**
519
	/**
630
	 * Test #17
520
	 * Test #17
631
	 */
521
	 */
632
	private function testerNomCompletEspece() {
-
 
633
		// Réalisation du test
522
	private function testerNomCompletEspece() {
634
		$noms_erreur = array();
523
		$noms_erreur = array();
635
		foreach ($this->noms as &$nom) {
524
		foreach ($this->noms as &$nom) {
636
			if ($nom['rang'] == $this->manuel['rang_sp']) {
525
			if ($nom['rang'] == $this->manuel['rang_sp']) {
637
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
526
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
Line 649... Line 538...
649
	
538
	
650
	/**
539
	/**
651
	 * Test #18
540
	 * Test #18
652
	 */
541
	 */
653
	private function testerNomCompletInfraSpecifique() {
-
 
654
		// Réalisation du test
542
	private function testerNomCompletInfraSpecifique() {
655
		$noms_erreur = array();
543
		$noms_erreur = array();
656
		foreach ($this->noms as &$nom) {
544
		foreach ($this->noms as &$nom) {
657
			if ($nom['rang'] > $this->manuel['rang_sp']) {
545
			if ($nom['rang'] > $this->manuel['rang_sp']) {
658
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
546
				$suffixe_plte_cultivee = $this->construireSuffixeNomPltCultivee($nom);
Line 672... Line 560...
672
	
560
	
673
	/**
561
	/**
674
	 * Test #19
562
	 * Test #19
675
	 */
563
	 */
676
	private function testerNomSupraGeneriqueEspaces() {
-
 
677
		// Réalisation du test
564
	private function testerNomSupraGeneriqueEspaces() {
678
		$noms_erreur = array();
565
		$noms_erreur = array();
679
		foreach ($this->noms as &$nom) {
566
		foreach ($this->noms as &$nom) {
680
			if ($nom['nom_supra_generique'] != '') {
567
			if ($nom['nom_supra_generique'] != '') {
681
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s+$)/', $nom['nom_supra_generique'])) {
568
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s+$)/', $nom['nom_supra_generique'])) {
Line 689... Line 576...
689
	
576
	
690
	/**
577
	/**
691
	 * Test #20
578
	 * Test #20
692
	 */
579
	 */
693
	private function testerNomSupraGeneriqueSyntaxe() {
-
 
694
		$info = $this->getInfosTest(20);
-
 
695
		
-
 
696
		// Réalisation du test
580
	private function testerNomSupraGeneriqueSyntaxe() {
697
		$noms_erreur = array();
581
		$noms_erreur = array();
698
		foreach ($this->noms as &$nom) {
582
		foreach ($this->noms as &$nom) {
699
			if ($nom['nom_supra_generique'] != '') {
583
			if ($nom['nom_supra_generique'] != '') {
700
				if (!preg_match('/^[A-ZÄËḦÏÖÜẄẌŸ][-a-zäëḧïöẗüẅẍÿ]+$/', $nom['nom_supra_generique'])) {
584
				if (!preg_match('/^[A-ZÄËḦÏÖÜẄẌŸ][-a-zäëḧïöẗüẅẍÿ]+$/', $nom['nom_supra_generique'])) {
701
					$nom_supra_generique_traite = $this->repererEspace($nom['nom_supra_generique']);
585
					$nom_supra_generique_traite = $this->repererEspace($nom['nom_supra_generique']);
702
					$noms_erreur[] = array($nom['num_nom'], $nom_supra_generique_traite);
586
					$noms_erreur[] = array($nom['num_nom'], $nom_supra_generique_traite);
703
				}
587
				}
704
			}
588
			}
705
		}
-
 
706
		
-
 
707
		// Analyse des résultats
-
 
708
		if (count($noms_erreur) > 0) {
-
 
709
			$info['message']['entete'] = array('num_nom', 'nom_supra_generique erroné');
-
 
710
			$info['message']['lignes'] = $noms_erreur;
-
 
711
		} else {
-
 
712
			$info['resultat'] = true;
-
 
713
		}
589
		}
714
		$noms_erreur = null;
-
 
715
		
-
 
716
		$this->traiterResultatTest($info);
590
		return $noms_erreur;
Line 717... Line 591...
717
	}
591
	}
718
	
592
	
719
	/**
593
	/**
720
	 * Test #21
594
	 * Test #21
721
	 */
-
 
722
	private function testerNomSupraGeneriqueRang() {
-
 
723
		$info = $this->getInfosTest(21);
-
 
724
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']);
-
 
725
		$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']);
-
 
726
		
595
	 */
727
		// Réalisation du test
596
	private function testerNomSupraGeneriqueRang() {
728
		$noms_erreur = array();
597
		$noms_erreur = array();
729
		foreach ($this->noms as &$nom) {
598
		foreach ($this->noms as &$nom) {
730
			if ($nom['nom_supra_generique'] != '') {
599
			if ($nom['nom_supra_generique'] != '') {
731
				if ($nom['rang'] >= $this->manuel['rang_genre']) {
600
				if ($nom['rang'] >= $this->manuel['rang_genre']) {
732
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
601
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
733
				}
602
				}
734
			}
-
 
735
		}
-
 
736
		
-
 
737
		// Analyse des résultats
-
 
738
		if (count($noms_erreur) > 0) {
-
 
739
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
740
			$info['message']['lignes'] = $noms_erreur;
-
 
741
		} else {
-
 
742
			$info['resultat'] = true;
603
			}
743
		}
-
 
744
		$noms_erreur = null;
-
 
745
		
604
		}
Line 746... Line 605...
746
		$this->traiterResultatTest($info);
605
		return $noms_erreur;
747
	}
606
	}
748
	
607
	
749
	/**
608
	/**
750
	 * Test #22
-
 
751
	 */
-
 
752
	private function testerGenreEspaces() {
-
 
753
		$info = $this->getInfosTest(22);
609
	 * Test #22
754
		
610
	 */
755
		// Réalisation du test
611
	private function testerGenreEspaces() {
756
		$noms_erreur = array();
612
		$noms_erreur = array();
757
		foreach ($this->noms as &$nom) {
613
		foreach ($this->noms as &$nom) {
758
			if ($nom['genre'] != '') {
614
			if ($nom['genre'] != '') {
759
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['genre'])) {
615
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['genre'])) {
760
					$nom_traite = $this->repererEspace($nom['genre']);
616
					$nom_traite = $this->repererEspace($nom['genre']);
761
					$noms_erreur[] = array($nom['num_nom'], $nom_traite);
617
					$noms_erreur[] = array($nom['num_nom'], $nom_traite);
762
				}
-
 
763
			}
-
 
764
		}
-
 
765
		
-
 
766
		// Analyse des résultats
-
 
767
		if (count($noms_erreur) > 0) {
-
 
768
			$info['message']['entete'] = array('num_nom', 'genre erroné');
-
 
769
			$info['message']['lignes'] = $noms_erreur;
-
 
770
		} else {
618
				}
771
			$info['resultat'] = true;
-
 
772
		}
-
 
773
		$noms_erreur = null;
619
			}
Line 774... Line 620...
774
		
620
		}
775
		$this->traiterResultatTest($info);
621
		return $noms_erreur;
776
	}
622
	}
777
	
623
	
778
	/**
-
 
779
	 * Test #23
-
 
780
	 */
-
 
781
	private function testerGenreSyntaxe() {
624
	/**
782
		$info = $this->getInfosTest(23);
625
	 * Test #23
783
		
626
	 */
784
		// Réalisation du test
627
	private function testerGenreSyntaxe() {
785
		$noms_erreur = array();
628
		$noms_erreur = array();
Line 792... Line 635...
792
						$noms_erreur[] = array($nom['num_nom'], $nom_traite);
635
						$noms_erreur[] = array($nom['num_nom'], $nom_traite);
793
					}
636
					}
794
				}
637
				}
795
			}
638
			}
796
		}
639
		}
797
		
-
 
798
		// Analyse des résultats
-
 
799
		if (count($noms_erreur) > 0) {
-
 
800
			$info['message']['entete'] = array('num_nom', 'genre erroné');
-
 
801
			$info['message']['lignes'] = $noms_erreur;
-
 
802
		} else {
-
 
803
			$info['resultat'] = true;
-
 
804
		}
-
 
805
		$noms_erreur = null;
640
		return $noms_erreur;
806
		
-
 
807
		$this->traiterResultatTest($info);
-
 
808
	}
641
	}
Line 809... Line 642...
809
	
642
	
810
	/**
643
	/**
811
	 * Test #24
644
	 * Test #24
812
	 */
645
	 */
813
	private function testerGenreRang() {
-
 
814
		$info = $this->getInfosTest(24);
-
 
815
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']);
-
 
816
		$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']);
-
 
817
		
-
 
818
		// Réalisation du test
646
	private function testerGenreRang() {
819
		$noms_erreur = array();
647
		$noms_erreur = array();
820
		foreach ($this->noms as &$nom) {
648
		foreach ($this->noms as &$nom) {
821
			if ($nom['genre'] != '') {
649
			if ($nom['genre'] != '') {
822
				if ($nom['rang'] < $this->manuel['rang_genre']) {
650
				if ($nom['rang'] < $this->manuel['rang_genre']) {
823
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
651
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
824
				}
652
				}
825
			}
653
			}
826
		}
-
 
827
		
-
 
828
		// Analyse des résultats
-
 
829
		if (count($noms_erreur) > 0) {
-
 
830
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
831
			$info['message']['lignes'] = $noms_erreur;
-
 
832
		} else {
-
 
833
			$info['resultat'] = true;
-
 
834
		}
654
		}
835
		$noms_erreur = null;
-
 
836
		
-
 
837
		$this->traiterResultatTest($info);
655
		return $noms_erreur;
Line 838... Line 656...
838
	}
656
	}
839
		
657
		
840
	/**
658
	/**
841
	 * Test #25
659
	 * Test #25
842
	 */
-
 
843
	private function testerEpitheteInfraGeneriqueSyntaxe() {
-
 
844
		$info = $this->getInfosTest(25);
-
 
845
		
660
	 */
846
		// Réalisation du test
661
	private function testerEpitheteInfraGeneriqueSyntaxe() {
847
		$noms_erreur = array();
662
		$noms_erreur = array();
848
		foreach ($this->noms as &$nom) {
663
		foreach ($this->noms as &$nom) {
849
			if ($nom['epithete_infra_generique'] != '') {
664
			if ($nom['epithete_infra_generique'] != '') {
850
				if (!preg_match('/^[A-ZÄËḦÏÖÜẄẌŸ][-a-zäëḧïöẗüẅẍÿ]+/', $nom['epithete_infra_generique'])) {
665
				if (!preg_match('/^[A-ZÄËḦÏÖÜẄẌŸ][-a-zäëḧïöẗüẅẍÿ]+/', $nom['epithete_infra_generique'])) {
851
					$epithete_traite = $this->repererEspace($nom['epithete_infra_generique']);
666
					$epithete_traite = $this->repererEspace($nom['epithete_infra_generique']);
852
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
667
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
853
				}
668
				}
854
			}
-
 
855
		}
-
 
856
		
-
 
857
		// Analyse des résultats
-
 
858
		if (count($noms_erreur) > 0) {
-
 
859
			$info['message']['entete'] = array('num_nom', 'epithete_infra_generique erroné');
-
 
860
			$info['message']['lignes'] = $noms_erreur;
-
 
861
		} else {
-
 
862
			$info['resultat'] = true;
669
			}
863
		}
-
 
864
		$noms_erreur = null;
-
 
865
		
670
		}
Line 866... Line 671...
866
		$this->traiterResultatTest($info);
671
		return $noms_erreur;
867
	}
672
	}
868
	
673
	
869
	/**
674
	/**
870
	 * Test #26
-
 
871
	 */
-
 
872
	private function testerEpitheteInfraGeneriqueRang() {
-
 
873
		$info = $this->getInfosTest(26);
-
 
874
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre'], $this->manuel['rang_sp']);
-
 
875
		$info['description'] = sprintf($info['description'], $this->manuel['rang_genre'], $this->manuel['rang_sp']);
675
	 * Test #26
876
		
676
	 */
877
		// Réalisation du test
677
	private function testerEpitheteInfraGeneriqueRang() {
878
		$noms_erreur = array();
678
		$noms_erreur = array();
879
		foreach ($this->noms as &$nom) {
679
		foreach ($this->noms as &$nom) {
880
			if ($nom['epithete_infra_generique'] != '') {
680
			if ($nom['epithete_infra_generique'] != '') {
881
				if ($nom['rang'] <= $this->manuel['rang_genre'] || $nom['rang'] >= $this->manuel['rang_sp']) {
681
				if ($nom['rang'] <= $this->manuel['rang_genre'] || $nom['rang'] >= $this->manuel['rang_sp']) {
882
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
682
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
883
				}
-
 
884
			}
-
 
885
		}
-
 
886
		
-
 
887
		// Analyse des résultats
-
 
888
		if (count($noms_erreur) > 0) {
-
 
889
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
890
			$info['message']['lignes'] = $noms_erreur;
-
 
891
		} else {
683
				}
892
			$info['resultat'] = true;
-
 
893
		}
-
 
894
		$noms_erreur = null;
684
			}
Line 895... Line 685...
895
		
685
		}
896
		$this->traiterResultatTest($info);
686
		return $noms_erreur;
897
	}
687
	}
898
	
688
	
899
	/**
-
 
900
	 * Test #27
-
 
901
	 */
-
 
902
	private function testerEpitheteInfraGeneriqueEspaces() {
689
	/**
903
		$info = $this->getInfosTest(27);
690
	 * Test #27
904
		
691
	 */
905
		// Réalisation du test
692
	private function testerEpitheteInfraGeneriqueEspaces() {
906
		$noms_erreur = array();
693
		$noms_erreur = array();
907
		foreach ($this->noms as &$nom) {
694
		foreach ($this->noms as &$nom) {
908
			if ($nom['epithete_infra_generique'] != '') {
695
			if ($nom['epithete_infra_generique'] != '') {
909
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_infra_generique'])) {
696
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_infra_generique'])) {
910
					$epithete_traite = $this->repererEspace($nom['epithete_infra_generique']);
697
					$epithete_traite = $this->repererEspace($nom['epithete_infra_generique']);
911
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
-
 
912
				}
-
 
913
			}
-
 
914
		}
-
 
915
		
-
 
916
		// Analyse des résultats
-
 
917
		if (count($noms_erreur) > 0) {
-
 
918
			$info['message']['entete'] = array('num_nom', 'epithete_infra_generique erroné');
-
 
919
			$info['message']['lignes'] = $noms_erreur;
698
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
920
		} else {
-
 
921
			$info['resultat'] = true;
-
 
922
		}
699
				}
Line 923... Line 700...
923
		$noms_erreur = null;
700
			}
924
		
701
		}
925
		$this->traiterResultatTest($info);
702
		return $noms_erreur;
926
	}
703
	}
927
	
-
 
928
	/**
-
 
929
	 * Test #28
-
 
930
	 */
704
	
931
	private function testerEpitheteSpEspaces() {
705
	/**
932
		$info = $this->getInfosTest(28);
706
	 * Test #28
933
		
707
	 */
934
		// Réalisation du test
708
	private function testerEpitheteSpEspaces() {
935
		$noms_erreur = array();
709
		$noms_erreur = array();
936
		foreach ($this->noms as &$nom) {
710
		foreach ($this->noms as &$nom) {
937
			if ($nom['epithete_sp'] != '') {
711
			if ($nom['epithete_sp'] != '') {
938
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_sp'])) {
712
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_sp'])) {
939
					$epithete_traite = $this->repererEspace($nom['epithete_sp']);
-
 
940
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
-
 
941
				}
-
 
942
			}
-
 
943
		}
-
 
944
		
-
 
945
		// Analyse des résultats
-
 
946
		if (count($noms_erreur) > 0) {
-
 
947
			$info['message']['entete'] = array('num_nom', 'epithete_sp erroné');
713
					$epithete_traite = $this->repererEspace($nom['epithete_sp']);
948
			$info['message']['lignes'] = $noms_erreur;
-
 
949
		} else {
-
 
950
			$info['resultat'] = true;
714
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
Line 951... Line 715...
951
		}
715
				}
952
		$noms_erreur = null;
716
			}
953
		
717
		}
954
		$this->traiterResultatTest($info);
718
		return $noms_erreur;
955
	}
-
 
956
	
-
 
957
	/**
-
 
958
	 * Test #29
719
	}
959
	 */
720
	
960
	private function testerEpitheteSpSyntaxe() {
721
	/**
961
		$info = $this->getInfosTest(29);
722
	 * Test #29
962
		
723
	 */
Line 971... Line 732...
971
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
732
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
972
					}
733
					}
973
				}
734
				}
974
			}
735
			}
975
		}
736
		}
976
		
-
 
977
		// Analyse des résultats
-
 
978
		if (count($noms_erreur) > 0) {
-
 
979
			$info['message']['entete'] = array('num_nom', 'epithete_sp erroné');
-
 
980
			$info['message']['lignes'] = $noms_erreur;
-
 
981
		} else {
-
 
982
			$info['resultat'] = true;
-
 
983
		}
-
 
984
		$noms_erreur = null;
737
		return $noms_erreur;
985
		
-
 
986
		$this->traiterResultatTest($info);
-
 
987
	}
738
	}
Line 988... Line 739...
988
	
739
	
989
	/**
740
	/**
990
	 * Test #30
741
	 * Test #30
991
	 */
742
	 */
992
	private function testerEpitheteSpRang() {
-
 
993
		$info = $this->getInfosTest(30);
-
 
994
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_sp']);
-
 
995
		$info['description'] = sprintf($info['description'], $this->manuel['rang_sp']);
-
 
996
		
-
 
997
		// Réalisation du test
743
	private function testerEpitheteSpRang() {
998
		$noms_erreur = array();
744
		$noms_erreur = array();
999
		foreach ($this->noms as &$nom) {
745
		foreach ($this->noms as &$nom) {
1000
			if ($nom['epithete_sp'] != '') {
746
			if ($nom['epithete_sp'] != '') {
1001
				if ($nom['rang'] < $this->manuel['rang_sp']) {
747
				if ($nom['rang'] < $this->manuel['rang_sp']) {
1002
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
748
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
1003
				}
749
				}
1004
			}
750
			}
1005
		}
-
 
1006
		
-
 
1007
		// Analyse des résultats
-
 
1008
		if (count($noms_erreur) > 0) {
-
 
1009
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
1010
			$info['message']['lignes'] = $noms_erreur;
-
 
1011
		} else {
-
 
1012
			$info['resultat'] = true;
-
 
1013
		}
751
		}
1014
		$noms_erreur = null;
-
 
1015
		
-
 
1016
		$this->traiterResultatTest($info);
752
		return $noms_erreur;
Line 1017... Line 753...
1017
	}
753
	}
1018
	
754
	
1019
	/**
755
	/**
1020
	 * Test #31
756
	 * Test #31
1021
	 */
-
 
1022
	private function testerTypeEpitheteEspaces() {
-
 
1023
		$info = $this->getInfosTest(31);
-
 
1024
		
757
	 */
1025
		// Réalisation du test
758
	private function testerTypeEpitheteEspaces() {
1026
		$noms_erreur = array();
759
		$noms_erreur = array();
1027
		foreach ($this->noms as &$nom) {
760
		foreach ($this->noms as &$nom) {
1028
			if ($nom['type_epithete'] != '') {
761
			if ($nom['type_epithete'] != '') {
1029
				if (preg_match('/\s+/', $nom['type_epithete'])) {
762
				if (preg_match('/\s+/', $nom['type_epithete'])) {
1030
					$valeur_traitee = $this->repererEspace($nom['epithete_sp']);
763
					$valeur_traitee = $this->repererEspace($nom['epithete_sp']);
1031
					$noms_erreur[] = array($nom['num_nom'], $valeur_traitee);
764
					$noms_erreur[] = array($nom['num_nom'], $valeur_traitee);
1032
				}
765
				}
1033
			}
-
 
1034
		}
-
 
1035
		
766
			}
1036
		// Analyse des résultats
-
 
1037
		if (count($noms_erreur) > 0) {
-
 
1038
			$info['message']['entete'] = array('num_nom', 'type_epithete erroné');
-
 
1039
			$info['message']['lignes'] = $noms_erreur;
-
 
1040
		} else {
-
 
1041
			$info['resultat'] = true;
-
 
1042
		}
-
 
1043
		
767
		}
Line 1044... Line 768...
1044
		$this->traiterResultatTest($info);
768
		return $noms_erreur;
1045
	}
769
	}
1046
	
770
	
1047
	/**
771
	/**
1048
	 * Test #32
-
 
1049
	 */
-
 
1050
	private function testerTypeEpitheteSyntaxe() {
-
 
1051
		$info = $this->getInfosTest(32);
772
	 * Test #32
1052
		
773
	 */
1053
		// Réalisation du test
774
	private function testerTypeEpitheteSyntaxe() {
1054
		$noms_erreur = array();
775
		$noms_erreur = array();
1055
		foreach ($this->noms as &$nom) {
776
		foreach ($this->noms as &$nom) {
1056
			if ($nom['type_epithete'] != '') {
777
			if ($nom['type_epithete'] != '') {
1057
				if (!$this->verifierTypeEpithete($nom['type_epithete'])) {
778
				if (!$this->verifierTypeEpithete($nom['type_epithete'])) {
1058
					$noms_erreur[] = array($nom['num_nom'],  $nom['type_epithete']);
779
					$noms_erreur[] = array($nom['num_nom'],  $nom['type_epithete']);
1059
				}
-
 
1060
			}
-
 
1061
		}
780
				}
1062
		
-
 
1063
		// Analyse des résultats
-
 
1064
		if (count($noms_erreur) > 0) {
-
 
1065
			$info['message']['entete'] = array('num_nom', 'type_epithete erroné');
-
 
1066
			$info['message']['lignes'] = $noms_erreur;
-
 
1067
		} else {
-
 
1068
			$info['resultat'] = true;
-
 
1069
		}
781
			}
Line 1070... Line 782...
1070
		
782
		}
1071
		$this->traiterResultatTest($info);
783
		return $noms_erreur;
1072
	}
784
	}
1073
	
785
	
1074
	/**
-
 
1075
	 * Test #33
-
 
1076
	 */
-
 
1077
	private function testerTypeEpitheteHybridite() {
786
	/**
1078
		$info = $this->getInfosTest(33);
787
	 * Test #33
1079
		
788
	 */
1080
		// Réalisation du test
789
	private function testerTypeEpitheteHybridite() {
1081
		$noms_erreur = array();
790
		$noms_erreur = array();
1082
		foreach ($this->noms as &$nom) {
791
		foreach ($this->noms as &$nom) {
1083
			if ($nom['type_epithete'] != '') {
792
			if ($nom['type_epithete'] != '') {
1084
				if (preg_match('/^(?:n-|notho-)/', $nom['type_epithete'])) {
793
				if (preg_match('/^(?:n-|notho-)/', $nom['type_epithete'])) {
1085
					$noms_erreur[] = array($nom['num_nom'], $nom['type_epithete']);
-
 
1086
				}
-
 
1087
			}
794
					$noms_erreur[] = array($nom['num_nom'], $nom['type_epithete']);
1088
		}
-
 
1089
		
-
 
1090
		// Analyse des résultats
-
 
1091
		if (count($noms_erreur) > 0) {
-
 
1092
			$info['message']['entete'] = array('num_nom', 'type_epithete erroné');
-
 
1093
			$info['message']['lignes'] = $noms_erreur;
-
 
1094
		} else {
-
 
1095
			$info['resultat'] = true;
795
				}
Line 1096... Line 796...
1096
		}
796
			}
1097
		
797
		}
1098
		$this->traiterResultatTest($info);
798
		return $noms_erreur;
1099
	}
799
	}
1100
	
-
 
1101
	/**
-
 
1102
	 * Test #34
-
 
1103
	 */
800
	
1104
	private function testerEpitheteInfraSpEspaces() {
801
	/**
1105
		$info = $this->getInfosTest(34);
802
	 * Test #34
1106
		
803
	 */
1107
		// Réalisation du test
804
	private function testerEpitheteInfraSpEspaces() {
1108
		$noms_erreur = array();
805
		$noms_erreur = array();
1109
		foreach ($this->noms as &$nom) {
806
		foreach ($this->noms as &$nom) {
1110
			if ($nom['epithete_infra_sp'] != '') {
807
			if ($nom['epithete_infra_sp'] != '') {
1111
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_infra_sp'])) {
808
				if (preg_match('/(?:^\s+(?!:\s+)|(?!:\s+)\s{2,}(?!:\s+)|(?!:\s+)\s+$)/', $nom['epithete_infra_sp'])) {
1112
					$epithete_traite = $this->repererEspace($nom['epithete_infra_sp']);
-
 
1113
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
-
 
1114
				}
-
 
1115
			}
-
 
1116
		}
-
 
1117
		
-
 
1118
		// Analyse des résultats
-
 
1119
		if (count($noms_erreur) > 0) {
-
 
1120
			$info['message']['entete'] = array('num_nom', 'epithete_infra_sp erroné');
809
					$epithete_traite = $this->repererEspace($nom['epithete_infra_sp']);
1121
			$info['message']['lignes'] = $noms_erreur;
-
 
1122
		} else {
-
 
1123
			$info['resultat'] = true;
810
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
Line 1124... Line 811...
1124
		}
811
				}
1125
		$noms_erreur = null;
812
			}
1126
		
813
		}
1127
		$this->traiterResultatTest($info);
814
		return $noms_erreur;
1128
	}
-
 
1129
	
-
 
1130
	/**
-
 
1131
	 * Test #35
815
	}
1132
	 */
816
	
1133
	private function testerEpitheteInfraSpSyntaxe() {
817
	/**
1134
		$info = $this->getInfosTest(35);
818
	 * Test #35
1135
		
819
	 */
Line 1144... Line 828...
1144
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
828
						$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
1145
					}
829
					}
1146
				}
830
				}
1147
			}
831
			}
1148
		}
832
		}
1149
		
-
 
1150
		// Analyse des résultats
-
 
1151
		if (count($noms_erreur) > 0) {
-
 
1152
			$info['message']['entete'] = array('num_nom', 'epithete_infra_sp erroné');
-
 
1153
			$info['message']['lignes'] = $noms_erreur;
-
 
1154
		} else {
-
 
1155
			$info['resultat'] = true;
-
 
1156
		}
-
 
1157
		$noms_erreur = null;
833
		return $noms_erreur;
1158
		
-
 
1159
		$this->traiterResultatTest($info);
-
 
1160
	}
834
	}
Line 1161... Line 835...
1161
	
835
	
1162
	/**
836
	/**
1163
	 * Test #36
837
	 * Test #36
1164
	 */
838
	 */
1165
	private function testerEpitheteInfraSpRang() {
-
 
1166
		$info = $this->getInfosTest(36);
-
 
1167
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_sp']);
-
 
1168
		$info['description'] = sprintf($info['description'], $this->manuel['rang_sp']);
-
 
1169
		
-
 
1170
		// Réalisation du test
839
	private function testerEpitheteInfraSpRang() {
1171
		$noms_erreur = array();
840
		$noms_erreur = array();
1172
		foreach ($this->noms as &$nom) {
841
		foreach ($this->noms as &$nom) {
1173
			if ($nom['epithete_infra_sp'] != '') {
842
			if ($nom['epithete_infra_sp'] != '') {
1174
				if ($nom['rang'] < $this->manuel['rang_sp']) {
843
				if ($nom['rang'] < $this->manuel['rang_sp']) {
1175
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
844
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
1176
				}
845
				}
1177
			}
846
			}
1178
		}
-
 
1179
		
-
 
1180
		// Analyse des résultats
-
 
1181
		if (count($noms_erreur) > 0) {
-
 
1182
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
1183
			$info['message']['lignes'] = $noms_erreur;
-
 
1184
		} else {
-
 
1185
			$info['resultat'] = true;
-
 
1186
		}
847
		}
1187
		$noms_erreur = null;
-
 
1188
		
-
 
1189
		$this->traiterResultatTest($info);
848
		return $noms_erreur;
Line 1190... Line 849...
1190
	}
849
	}
1191
	
850
	
1192
	/**
851
	/**
1193
	 * Test #37
852
	 * Test #37
1194
	 */
-
 
1195
	private function testerGroupeCultivarSyntaxe() {
-
 
1196
		$info = $this->getInfosTest(37);
-
 
1197
		
853
	 */
1198
		// Réalisation du test
854
	private function testerGroupeCultivarSyntaxe() {
1199
		$noms_erreur = array();
855
		$noms_erreur = array();
1200
		foreach ($this->noms as &$nom) {
856
		foreach ($this->noms as &$nom) {
1201
			if ($nom['cultivar_groupe'] != '') {
857
			if ($nom['cultivar_groupe'] != '') {
1202
				if (!$this->verifierEpitheteGroupeCultivar($nom['cultivar_groupe'])) {
858
				if (!$this->verifierEpitheteGroupeCultivar($nom['cultivar_groupe'])) {
1203
					$epithete_traite = $this->repererEspace($nom['cultivar_groupe']);
859
					$epithete_traite = $this->repererEspace($nom['cultivar_groupe']);
1204
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
860
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
1205
				}
861
				}
1206
			}
-
 
1207
		}
-
 
1208
		
-
 
1209
		// Analyse des résultats
-
 
1210
		if (count($noms_erreur) > 0) {
-
 
1211
			$info['message']['entete'] = array('num_nom', 'cultivar_groupe erroné');
-
 
1212
			$info['message']['lignes'] = $noms_erreur;
-
 
1213
		} else {
-
 
1214
			$info['resultat'] = true;
862
			}
1215
		}
-
 
1216
		$noms_erreur = null;
-
 
1217
		
863
		}
Line 1218... Line 864...
1218
		$this->traiterResultatTest($info);
864
		return $noms_erreur;
1219
	}
865
	}
1220
	
866
	
1221
	/**
867
	/**
1222
	 * Test #38
-
 
1223
	 */
-
 
1224
	private function testerGroupeCultivarRang() {
-
 
1225
		$info = $this->getInfosTest(38);
-
 
1226
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']);
-
 
1227
		$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']);
868
	 * Test #38
1228
		
869
	 */
1229
		// Réalisation du test
870
	private function testerGroupeCultivarRang() {
1230
		$noms_erreur = array();
871
		$noms_erreur = array();
1231
		foreach ($this->noms as &$nom) {
872
		foreach ($this->noms as &$nom) {
1232
			if ($nom['cultivar_groupe'] != '') {
873
			if ($nom['cultivar_groupe'] != '') {
1233
				if ($nom['rang'] < $this->manuel['rang_genre']) {
874
				if ($nom['rang'] < $this->manuel['rang_genre']) {
1234
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
875
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
1235
				}
-
 
1236
			}
-
 
1237
		}
-
 
1238
		
-
 
1239
		// Analyse des résultats
-
 
1240
		if (count($noms_erreur) > 0) {
-
 
1241
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
-
 
1242
			$info['message']['lignes'] = $noms_erreur;
-
 
1243
		} else {
876
				}
1244
			$info['resultat'] = true;
-
 
1245
		}
-
 
1246
		$noms_erreur = null;
877
			}
Line 1247... Line 878...
1247
		
878
		}
1248
		$this->traiterResultatTest($info);
879
		return $noms_erreur;
1249
	}
880
	}
1250
	
881
	
1251
	/**
-
 
1252
	 * Test #39
-
 
1253
	 */
-
 
1254
	private function testerCultivarSyntaxe() {
882
	/**
1255
		$info = $this->getInfosTest(39);
883
	 * Test #39
1256
 
884
	 */
1257
		// Réalisation du test
885
	private function testerCultivarSyntaxe() {
1258
		$noms_erreur = array();
886
		$noms_erreur = array();
1259
		foreach ($this->noms as &$nom) {
887
		foreach ($this->noms as &$nom) {
1260
			if ($nom['cultivar'] != '') {
888
			if ($nom['cultivar'] != '') {
1261
				if (!$this->verifierEpitheteCultivar($nom['cultivar'])) {
889
				if (!$this->verifierEpitheteCultivar($nom['cultivar'])) {
1262
					$epithete_traite = $this->repererEspace($nom['cultivar']);
890
					$epithete_traite = $this->repererEspace($nom['cultivar']);
1263
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
-
 
1264
				}
-
 
1265
			}
-
 
1266
		}
-
 
1267
		
-
 
1268
		// Analyse des résultats
-
 
1269
		if (count($noms_erreur) > 0) {
-
 
1270
			$info['message']['entete'] = array('num_nom', 'cultivar erroné');
-
 
1271
			$info['message']['lignes'] = $noms_erreur;
891
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
1272
		} else {
-
 
1273
			$info['resultat'] = true;
-
 
1274
		}
892
				}
Line 1275... Line 893...
1275
		$noms_erreur = null;
893
			}
1276
		
894
		}
1277
		$this->traiterResultatTest($info);
895
		return $noms_erreur;
1278
	}
896
	}
1279
	
-
 
1280
	/**
-
 
1281
	 * Test #40
-
 
1282
	 */
-
 
1283
	private function testerCultivarRang() {
-
 
1284
		$info = $this->getInfosTest(40);
897
	
1285
		$info['nom'] = sprintf($info['nom'], $this->manuel['rang_genre']);
898
	/**
1286
		$info['description'] = sprintf($info['description'], $this->manuel['rang_genre']);
899
	 * Test #40
1287
		
900
	 */
1288
		// Réalisation du test
901
	private function testerCultivarRang() {
1289
		$noms_erreur = array();
902
		$noms_erreur = array();
1290
		foreach ($this->noms as &$nom) {
903
		foreach ($this->noms as &$nom) {
1291
			if ($nom['cultivar'] != '') {
904
			if ($nom['cultivar'] != '') {
1292
				if ($nom['rang'] < $this->manuel['rang_genre']) {
-
 
1293
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
-
 
1294
				}
-
 
1295
			}
-
 
1296
		}
-
 
1297
		
-
 
1298
		// Analyse des résultats
-
 
1299
		if (count($noms_erreur) > 0) {
-
 
1300
			$info['message']['entete'] = array('num_nom', 'nom_sci', 'rang erroné');
905
				if ($nom['rang'] < $this->manuel['rang_genre']) {
1301
			$info['message']['lignes'] = $noms_erreur;
-
 
1302
		} else {
-
 
1303
			$info['resultat'] = true;
906
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci'], $nom['rang']);
Line 1304... Line 907...
1304
		}
907
				}
1305
		$noms_erreur = null;
908
			}
1306
		
909
		}
1307
		$this->traiterResultatTest($info);
910
		return $noms_erreur;
1308
	}
-
 
1309
	
-
 
1310
	/**
-
 
1311
	 * Test #41
911
	}
1312
	 */
912
	
1313
	private function testerNomCommercialSyntaxe() {
913
	/**
1314
		$info = $this->getInfosTest(41);
914
	 * Test #41
1315
		
915
	 */
1316
		// Réalisation du test
916
	private function testerNomCommercialSyntaxe() {
1317
		$noms_erreur = array();
917
		$noms_erreur = array();
1318
		foreach ($this->noms as &$nom) {
918
		foreach ($this->noms as &$nom) {
1319
			if ($nom['nom_commercial'] != '') {
919
			if ($nom['nom_commercial'] != '') {
1320
				if (!$this->verifierNomCommercial($nom['nom_commercial'])) {
-
 
1321
					$epithete_traite = $this->repererEspace($nom['nom_commercial']);
-
 
1322
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
-
 
1323
				}
-
 
1324
			}
-
 
1325
		}
-
 
1326
		
-
 
1327
		// Analyse des résultats
-
 
1328
		if (count($noms_erreur) > 0) {
920
				if (!$this->verifierNomCommercial($nom['nom_commercial'])) {
1329
			$info['message']['entete'] = array('num_nom', 'cultivar erroné');
-
 
1330
			$info['message']['lignes'] = $noms_erreur;
-
 
1331
		} else {
921
					$epithete_traite = $this->repererEspace($nom['nom_commercial']);
Line 1332... Line 922...
1332
			$info['resultat'] = true;
922
					$noms_erreur[] = array($nom['num_nom'], $epithete_traite);
1333
		}
923
				}
1334
		$noms_erreur = null;
924
			}
1335
		
925
		}
1336
		$this->traiterResultatTest($info);
-
 
1337
	}
-
 
1338
	
-
 
1339
	/**
926
		return $noms_erreur;
1340
	 * Test #42
927
	}
1341
	 */
928
	
1342
	private function testerNomCommercialPresenceCultivar() {
929
	/**
1343
		$info = $this->getInfosTest(42);
930
	 * Test #42
1344
		
931
	 */
1345
		// Réalisation du test
-
 
1346
		$noms_erreur = array();
-
 
1347
		foreach ($this->noms as &$nom) {
-
 
1348
			if ((isset($nom['nom_commercial']) && $nom['nom_commercial'] != '') && ($nom['cultivar'] == '' && $nom['cultivar_groupe'] == '')) {
-
 
1349
				$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']);
-
 
1350
			}
-
 
1351
		}
-
 
1352
		
-
 
1353
		// Analyse des résultats
932
	private function testerNomCommercialPresenceCultivar() {
1354
		if (count($noms_erreur) > 0) {
-
 
1355
			$info['message']['entete'] = array('num_nom', 'nom_commercial sans cultivar ou cultivar_groupe');
-
 
1356
			$info['message']['lignes'] = $noms_erreur;
933
		$noms_erreur = array();
Line 1357... Line 934...
1357
		} else {
934
		foreach ($this->noms as &$nom) {
1358
			$info['resultat'] = true;
935
			if ((isset($nom['nom_commercial']) && $nom['nom_commercial'] != '') && ($nom['cultivar'] == '' && $nom['cultivar_groupe'] == '')) {
1359
		}
936
				$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']);
1360
		$noms_erreur = null;
937
			}
1361
		
-
 
1362
		$this->traiterResultatTest($info);
-
 
1363
	}
-
 
1364
	
938
		}
1365
	/**
939
		return $noms_erreur;
1366
	 * Test #43
940
	}
1367
	 */
941
	
1368
	private function testerAuteurSyntaxe() {
942
	/**
1369
		$info = $this->getInfosTest(43);
943
	 * Test #43
1370
		
944
	 */
1371
		// Réalisation du test
945
	private function testerAuteurSyntaxe() {
1372
		$noms_erreur = array();
946
		$noms_erreur = array();
1373
		foreach ($this->noms as &$nom) {
-
 
1374
			if ($nom['auteur'] != '') {
-
 
1375
				if (!$this->verifierAuteur($nom['auteur'])) {
-
 
1376
					$intitule_traite = $this->repererEspace($nom['auteur']);
-
 
1377
					$noms_erreur[] = array($nom['num_nom'], $intitule_traite);
-
 
1378
				}
-
 
1379
			}
-
 
1380
		}
-
 
1381
		
947
		foreach ($this->noms as &$nom) {
1382
		// Analyse des résultats
-
 
1383
		if (count($noms_erreur) > 0) {
-
 
1384
			$info['message']['entete'] = array('num_nom', 'auteur erroné');
948
			if ($nom['auteur'] != '') {
Line 1385... Line 949...
1385
			$info['message']['lignes'] = $noms_erreur;
949
				if (!$this->verifierAuteur($nom['auteur'])) {
1386
		} else {
950
					$intitule_traite = $this->repererEspace($nom['auteur']);
1387
			$info['resultat'] = true;
951
					$noms_erreur[] = array($nom['num_nom'], $intitule_traite);
1388
		}
952
				}
1389
		$noms_erreur = null;
-
 
1390
		
-
 
1391
		$this->traiterResultatTest($info);
-
 
1392
	}
953
			}
1393
	
954
		}
1394
	/**
955
		return $noms_erreur;
1395
	 * Test #44
956
	}
1396
	 */
957
	
1397
	private function testerAnneeSyntaxe() {
958
	/**
1398
		$info = $this->getInfosTest(44);
959
	 * Test #44
1399
		
960
	 */
1400
		// Réalisation du test
-
 
1401
		$noms_erreur = array();
-
 
1402
		foreach ($this->noms as &$nom) {
-
 
1403
			if ($nom['annee'] != '') {
-
 
1404
				if (!$this->verifierAnnee($nom['annee'])) {
-
 
1405
					$noms_erreur[] = array($nom['num_nom'], $nom['annee']);
-
 
1406
				}
-
 
1407
			}
-
 
1408
		}
961
	private function testerAnneeSyntaxe() {
1409
		
-
 
1410
		// Analyse des résultats
-
 
1411
		if (count($noms_erreur) > 0) {
962
		$noms_erreur = array();
Line 1412... Line 963...
1412
			$info['message']['entete'] = array('num_nom', 'annee erronée');
963
		foreach ($this->noms as &$nom) {
1413
			$info['message']['lignes'] = $noms_erreur;
964
			if ($nom['annee'] != '') {
1414
		} else {
965
				if (!$this->verifierAnnee($nom['annee'])) {
1415
			$info['resultat'] = true;
966
					$noms_erreur[] = array($nom['num_nom'], $nom['annee']);
1416
		}
-
 
1417
		$noms_erreur = null;
-
 
1418
		
-
 
1419
		$this->traiterResultatTest($info);
967
				}
1420
	}
968
			}
1421
	
969
		}
1422
	/**
970
		return $noms_erreur;
1423
	 * Test #45
971
	}
1424
	 */
972
	
1425
	private function testerBiblioOrigineSyntaxe() {
973
	/**
1426
		$info = $this->getInfosTest(45);
974
	 * Test #45
1427
		
975
	 */
1428
		// Réalisation du test
-
 
1429
		$noms_erreur = array();
-
 
1430
		foreach ($this->noms as &$nom) {
-
 
1431
			if ($nom['biblio_origine'] != '') {
-
 
1432
				if (!$this->verifierBiblioOrigine($nom['biblio_origine'])) {
-
 
1433
					$biblio_traite = $this->repererEspace($nom['biblio_origine']);
-
 
1434
					$noms_erreur[] = array($nom['num_nom'], $biblio_traite);
-
 
1435
				}
-
 
1436
			}
976
	private function testerBiblioOrigineSyntaxe() {
1437
		}
-
 
1438
		
-
 
1439
		// Analyse des résultats
977
		$noms_erreur = array();
Line 1440... Line 978...
1440
		if (count($noms_erreur) > 0) {
978
		foreach ($this->noms as &$nom) {
1441
			$info['message']['entete'] = array('num_nom', 'biblio_origine erroné');
979
			if ($nom['biblio_origine'] != '') {
1442
			$info['message']['lignes'] = $noms_erreur;
980
				if (!$this->verifierBiblioOrigine($nom['biblio_origine'])) {
1443
		} else {
981
					$biblio_traite = $this->repererEspace($nom['biblio_origine']);
1444
			$info['resultat'] = true;
-
 
1445
		}
-
 
1446
		$noms_erreur = null;
-
 
1447
		
982
					$noms_erreur[] = array($nom['num_nom'], $biblio_traite);
1448
		$this->traiterResultatTest($info);
983
				}
1449
	}
984
			}
1450
	
985
		}
1451
	/**
986
		return $noms_erreur;
1452
	 * Test #46
987
	}
1453
	 */
988
	
1454
	private function testerHomonymieSyntaxe() {
989
	/**
1455
		$info = $this->getInfosTest(46);
-
 
1456
		
-
 
1457
		// Réalisation du test
-
 
1458
		$noms_erreur = array();
-
 
1459
		foreach ($this->noms as &$nom) {
-
 
1460
			if ($nom['homonyme'] != '') {
-
 
1461
				if (!$this->verifierBooleen($nom['homonyme'])) {
-
 
1462
					$noms_erreur[] = array($nom['num_nom'], $nom['homonyme']);
-
 
1463
				}
990
	 * Test #46
1464
			}
-
 
1465
		}
-
 
1466
		
991
	 */
Line 1467... Line 992...
1467
		// Analyse des résultats
992
	private function testerHomonymieSyntaxe() {
1468
		if (count($noms_erreur) > 0) {
993
		$noms_erreur = array();
1469
			$info['message']['entete'] = array('num_nom', 'homonyme erroné');
994
		foreach ($this->noms as &$nom) {
1470
			$info['message']['lignes'] = $noms_erreur;
995
			if ($nom['homonyme'] != '') {
1471
		} else {
-
 
1472
			$info['resultat'] = true;
-
 
1473
		}
996
				if (!$this->verifierBooleen($nom['homonyme'])) {
Line 1474... Line -...
1474
		$noms_erreur = null;
-
 
1475
		
997
					$noms_erreur[] = array($nom['num_nom'], $nom['homonyme']);
1476
		$this->traiterResultatTest($info);
998
				}
1477
	}
999
			}
1478
	
1000
		}
1479
	/**
1001
		return $noms_erreur;
1480
	 * Test #47
1002
	}
1481
	 */
1003
	
1482
	private function testerHomonymieExistence() {
1004
	/**
1483
		$info = $this->getInfosTest(47);
1005
	 * Test #47
1484
		
-
 
1485
		$noms_homonymie = $this->classerNomsParNomComplet();
-
 
1486
		
-
 
1487
		// Réalisation du test
-
 
1488
		$noms_erreur = array();
-
 
1489
		foreach ($this->noms as &$nom) {
-
 
1490
			if ($nom['homonyme'] != '0' && $nom['homonyme'] != '') {
-
 
1491
				if ($noms_homonymie[$nom['nom_sci']] <= 1) {
-
 
1492
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']);
1006
	 */
1493
				}
-
 
1494
			}
-
 
1495
		}
1007
	private function testerHomonymieExistence() {
Line 1496... Line 1008...
1496
		$noms_homonymie = null;
1008
		$noms_homonymie = $this->classerNomsParNomComplet();
1497
		
1009
		
1498
		// Analyse des résultats
1010
		$noms_erreur = array();
1499
		if (count($noms_erreur) > 0) {
1011
		foreach ($this->noms as &$nom) {
1500
			$info['message']['entete'] = array('num_nom', 'homonyme introuvable');
-
 
1501
			$info['message']['lignes'] = $noms_erreur;
-
 
1502
		} else {
-
 
1503
			$info['resultat'] = true;
1012
			if ($nom['homonyme'] != '0' && $nom['homonyme'] != '') {
1504
		}
1013
				if ($noms_homonymie[$nom['nom_sci']] <= 1) {
1505
		$noms_erreur = null;
1014
					$noms_erreur[] = array($nom['num_nom'], $nom['nom_sci']);
1506
		
1015
				}
1507
		$this->traiterResultatTest($info);
1016
			}
1508
	}
1017
		}
1509
	
1018
		$noms_homonymie = null;
1510
	/**
1019
		return $noms_erreur;
1511
	 * Test #48
-
 
1512
	 */
-
 
1513
	private function testerBasionymeSyntaxe() {
-
 
1514
		$info = $this->getInfosTest(48);
-
 
1515
		
-
 
1516
		// Réalisation du test
-
 
1517
		$noms_erreur = array();
-
 
1518
		foreach ($this->noms as &$nom) {
-
 
1519
			if ($nom['basionyme'] != '') {
1020
	}
1520
				if (!$this->verifierNombre($nom['basionyme'])) {
-
 
1521
					$noms_erreur[] = array($nom['num_nom'], $nom['basionyme']);
-
 
1522
				}
1021
	
Line 1523... Line 1022...
1523
			}
1022
	/**
1524
		}
1023
	 * Test #48
1525
		
1024
	 */
1526
		// Analyse des résultats
1025
	private function testerBasionymeSyntaxe() {
1527
		if (count($noms_erreur) > 0) {
-
 
1528
			$info['message']['entete'] = array('num_nom', 'basionyme erroné');
-
 
1529
			$info['message']['lignes'] = $noms_erreur;
-
 
1530
		} else {
1026
		$noms_erreur = array();
1531
			$info['resultat'] = true;
1027
		foreach ($this->noms as &$nom) {
1532
		}
1028
			if ($nom['basionyme'] != '') {
1533
		$noms_erreur = null;
1029
				if (!$this->verifierNombre($nom['basionyme'])) {
1534
		
1030
					$noms_erreur[] = array($nom['num_nom'], $nom['basionyme']);
1535
		$this->traiterResultatTest($info);
1031
				}
1536
	}
1032
			}
1537
 
1033
		}
1538
	/**
-
 
1539
	 * Test #49
-
 
1540
	 */
-
 
1541
	private function testerBasionymeExistence() {
-
 
1542
		$info = $this->getInfosTest(49);
-
 
1543
		
-
 
1544
		// Réalisation du test
-
 
1545
		$noms_erreur = array();
-
 
1546
		foreach ($this->noms as &$nom) {
1034
		return $noms_erreur;
1547
			if ($nom['basionyme'] != '') {
-
 
1548
				if (!isset($this->noms[$nom['basionyme']])) {
-
 
1549
					$noms_erreur[] = array($nom['num_nom'], $nom['basionyme']);
1035
	}
Line 1550... Line 1036...
1550
				}
1036
 
1551
			}
1037
	/**
1552
		}
1038
	 * Test #49
1553
		
1039
	 */
1554
		// Analyse des résultats
-
 
1555
		if (count($noms_erreur) > 0) {
-
 
1556
			$info['message']['entete'] = array('num_nom', 'basionyme introuvable');
-
 
1557
			$info['message']['lignes'] = $noms_erreur;
1040
	private function testerBasionymeExistence() {
1558
		} else {
1041
		$noms_erreur = array();
1559
			$info['resultat'] = true;
1042
		foreach ($this->noms as &$nom) {
1560
		}
1043
			if ($nom['basionyme'] != '') {
1561
		$noms_erreur = null;
1044
				if (!isset($this->noms[$nom['basionyme']])) {
1562
		
1045
					$noms_erreur[] = array($nom['num_nom'], $nom['basionyme']);
1563
		$this->traiterResultatTest($info);
1046
				}
1564
	}
1047
			}
1565
	
-
 
1566
	/**
-
 
1567
	 * Test #50
-
 
1568
	 */
-
 
1569
	private function testerSynonymeProparteSyntaxe() {
-
 
1570
		$info = $this->getInfosTest(50);
-
 
1571
		
-
 
1572
		// Réalisation du test
-
 
1573
		$noms_erreur = array();
1048
		}
1574
		foreach ($this->noms as &$nom) {
-
 
1575
			if ($nom['synonyme_proparte'] != '') {
-
 
1576
				if (!$this->verifierNombreSuite($nom['synonyme_proparte'])) {
1049
		return $noms_erreur;
Line 1577... Line 1050...
1577
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_proparte']);
1050
	}
1578
				}
1051
	
1579
			}
1052
	/**
1580
		}
1053
	 * Test #50
1581
		
-
 
1582
		// Analyse des résultats
-
 
1583
		if (count($noms_erreur) > 0) {
-
 
1584
			$info['message']['entete'] = array('num_nom', 'synonyme_proparte erroné');
1054
	 */
1585
			$info['message']['lignes'] = $noms_erreur;
1055
	private function testerSynonymeProparteSyntaxe() {
1586
		} else {
1056
		$noms_erreur = array();
1587
			$info['resultat'] = true;
1057
		foreach ($this->noms as &$nom) {
1588
		}
1058
			if ($nom['synonyme_proparte'] != '') {
Line 1611... Line 1081...
1611
				if (count($nbre_en_erreur) > 0) {
1081
				if (count($nbre_en_erreur) > 0) {
1612
					$noms_erreur[] = array($nom['num_nom'], implode(',', $num_nom_en_erreur));
1082
					$noms_erreur[] = array($nom['num_nom'], implode(',', $num_nom_en_erreur));
1613
				}
1083
				}
1614
			}
1084
			}
1615
		}
1085
		}
1616
		
-
 
1617
		// Analyse des résultats
-
 
1618
		if (count($noms_erreur) > 0) {
-
 
1619
			$info['message']['entete'] = array('num_nom', 'synonyme_proparte introuvable');
-
 
1620
			$info['message']['lignes'] = $noms_erreur;
-
 
1621
		} else {
-
 
1622
			$info['resultat'] = true;
-
 
1623
		}
-
 
1624
		$noms_erreur = null;
1086
		return $noms_erreur;
1625
		
-
 
1626
		$this->traiterResultatTest($info);
-
 
1627
	}
1087
	}
Line 1628... Line 1088...
1628
	
1088
	
1629
	/**
1089
	/**
1630
	 * Test #52
1090
	 * Test #52
1631
	 */
1091
	 */
1632
	private function testerSynonymeDouteuxSyntaxe() {
-
 
1633
		$info = $this->getInfosTest(52);
-
 
1634
		
-
 
1635
		// Réalisation du test
1092
	private function testerSynonymeDouteuxSyntaxe() {
1636
		$noms_erreur = array();
1093
		$noms_erreur = array();
1637
		foreach ($this->noms as &$nom) {
1094
		foreach ($this->noms as &$nom) {
1638
			if ($nom['synonyme_douteux'] != '') {
1095
			if ($nom['synonyme_douteux'] != '') {
1639
				if (!$this->verifierBooleen($nom['synonyme_douteux'])) {
1096
				if (!$this->verifierBooleen($nom['synonyme_douteux'])) {
1640
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux']);
1097
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux']);
1641
				}
1098
				}
1642
			}
1099
			}
1643
		}
-
 
1644
		
-
 
1645
		// Analyse des résultats
-
 
1646
		if (count($noms_erreur) > 0) {
-
 
1647
			$info['message']['entete'] = array('num_nom', 'synonyme_douteux erroné');
-
 
1648
			$info['message']['lignes'] = $noms_erreur;
-
 
1649
		} else {
-
 
1650
			$info['resultat'] = true;
-
 
1651
		}
1100
		}
1652
		$noms_erreur = null;
-
 
1653
		
-
 
1654
		$this->traiterResultatTest($info);
1101
		return $noms_erreur;		
Line 1655... Line 1102...
1655
	}
1102
	}
1656
	
1103
	
1657
	/**
1104
	/**
1658
	 * Test #53
1105
	 * Test #53
1659
	 */
-
 
1660
	private function testerSynonymeDouteuxNumNomRetenu() {
-
 
1661
		$info = $this->getInfosTest(53);
-
 
1662
		
1106
	 */
1663
		// Réalisation du test
1107
	private function testerSynonymeDouteuxNumNomRetenu() {
1664
		$noms_erreur = array();
1108
		$noms_erreur = array();
1665
		foreach ($this->noms as &$nom) {
1109
		foreach ($this->noms as &$nom) {
1666
			if ($nom['synonyme_douteux'] == 1 && $nom['num_nom_retenu'] != ' ') {
1110
			if ($nom['synonyme_douteux'] == 1 && $nom['num_nom_retenu'] != ' ') {
1667
				$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux'], $nom['num_nom_retenu']);
1111
				$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_douteux'], $nom['num_nom_retenu']);
1668
			}
-
 
1669
		}
-
 
1670
		
-
 
1671
		// Analyse des résultats
-
 
1672
		if (count($noms_erreur) > 0) {
-
 
1673
			$info['message']['entete'] = array('num_nom', 'synonyme_douteux', 'num_nom_retenu');
-
 
1674
			$info['message']['lignes'] = $noms_erreur;
-
 
1675
		} else {
-
 
1676
			$info['resultat'] = true;
1112
			}
1677
		}
-
 
1678
		$noms_erreur = null;
1113
		}
Line 1679... Line 1114...
1679
		$this->traiterResultatTest($info);
1114
		return $noms_erreur;
1680
	}
1115
	}
1681
	
1116
	
1682
	/**
1117
	/**
1683
	 * Test #54
-
 
1684
	 */
-
 
1685
	private function testerSynonymeMalAppliqueSyntaxe() {
-
 
1686
		$info = $this->getInfosTest(54);
1118
	 * Test #54
1687
		
1119
	 */
1688
		// Réalisation du test
1120
	private function testerSynonymeMalAppliqueSyntaxe() {
1689
		$noms_erreur = array();
1121
		$noms_erreur = array();
1690
		foreach ($this->noms as &$nom) {
1122
		foreach ($this->noms as &$nom) {
1691
			if ($nom['synonyme_mal_applique'] != '') {
1123
			if ($nom['synonyme_mal_applique'] != '') {
1692
				if (!$this->verifierBooleen($nom['synonyme_mal_applique'])) {
1124
				if (!$this->verifierBooleen($nom['synonyme_mal_applique'])) {
1693
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_mal_applique']);
1125
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_mal_applique']);
1694
				}
-
 
1695
			}
-
 
1696
		}
-
 
1697
		
-
 
1698
		// Analyse des résultats
-
 
1699
		if (count($noms_erreur) > 0) {
-
 
1700
			$info['message']['entete'] = array('num_nom', 'synonyme_mal_applique erroné');
-
 
1701
			$info['message']['lignes'] = $noms_erreur;
-
 
1702
		} else {
1126
				}
1703
			$info['resultat'] = true;
-
 
1704
		}
-
 
1705
		$noms_erreur = null;
1127
			}
Line 1706... Line 1128...
1706
		
1128
		}
1707
		$this->traiterResultatTest($info);
1129
		return $noms_erreur;
1708
	}
1130
	}
1709
	
1131
	
1710
	/**
-
 
1711
	 * Test #55
-
 
1712
	 */
-
 
1713
	private function testerSynonymeOrthographiqueSyntaxe() {
1132
	/**
1714
		$info = $this->getInfosTest(55);
1133
	 * Test #55
1715
		
1134
	 */
1716
		// Réalisation du test
1135
	private function testerSynonymeOrthographiqueSyntaxe() {
1717
		$noms_erreur = array();
1136
		$noms_erreur = array();
1718
		foreach ($this->noms as $nom) {
1137
		foreach ($this->noms as $nom) {
1719
			if ($nom['synonyme_orthographique'] != '') {
1138
			if ($nom['synonyme_orthographique'] != '') {
1720
				if (!$this->verifierNombre($nom['synonyme_orthographique'])) {
1139
				if (!$this->verifierNombre($nom['synonyme_orthographique'])) {
1721
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_orthographique']);
-
 
1722
				}
-
 
1723
			}
-
 
1724
		}
-
 
1725
		
-
 
1726
		// Analyse des résultats
-
 
1727
		if (count($noms_erreur) > 0) {
-
 
1728
			$info['message']['entete'] = array('num_nom', 'synonyme_orthographique erroné');
-
 
1729
			$info['message']['lignes'] = $noms_erreur;
1140
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_orthographique']);
1730
		} else {
-
 
1731
			$info['resultat'] = true;
-
 
1732
		}
1141
				}
Line 1733... Line 1142...
1733
		$noms_erreur = null;
1142
			}
1734
		
1143
		}
1735
		$this->traiterResultatTest($info);
1144
		return $noms_erreur;
1736
	}
1145
	}
1737
	
-
 
1738
	/**
-
 
1739
	 * Test #56
-
 
1740
	 */
1146
	
1741
	private function testerSynonymeOrthographiqueExistence() {
1147
	/**
1742
		$info = $this->getInfosTest(56);
1148
	 * Test #56
1743
		
1149
	 */
1744
		// Réalisation du test
1150
	private function testerSynonymeOrthographiqueExistence() {
1745
		$noms_erreur = array();
1151
		$noms_erreur = array();
1746
		foreach ($this->noms as &$nom) {
1152
		foreach ($this->noms as &$nom) {
1747
			if ($nom['synonyme_orthographique'] != '') {
1153
			if ($nom['synonyme_orthographique'] != '') {
1748
				if (!isset($this->noms[$nom['synonyme_orthographique']])) {
-
 
1749
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_orthographique']);
-
 
1750
				}
-
 
1751
			}
-
 
1752
		}
-
 
1753
		
-
 
1754
		// Analyse des résultats
-
 
1755
		if (count($noms_erreur) > 0) {
-
 
1756
			$info['message']['entete'] = array('num_nom', 'synonyme_orthographique introuvable');
1154
				if (!isset($this->noms[$nom['synonyme_orthographique']])) {
1757
			$info['message']['lignes'] = $noms_erreur;
-
 
1758
		} else {
-
 
1759
			$info['resultat'] = true;
1155
					$noms_erreur[] = array($nom['num_nom'], $nom['synonyme_orthographique']);
Line 1760... Line 1156...
1760
		}
1156
				}
1761
		$noms_erreur = null;
1157
			}
1762
		
1158
		}
1763
		$this->traiterResultatTest($info);
1159
		return $noms_erreur;
1764
	}
-
 
1765
	
-
 
1766
	/**
-
 
1767
	 * Test #57
1160
	}
1768
	 */
1161
	
1769
	private function testerHybrideParent01Syntaxe() {
1162
	/**
1770
		$info = $this->getInfosTest(57);
1163
	 * Test #57
1771
		
1164
	 */
1772
		// Réalisation du test
1165
	private function testerHybrideParent01Syntaxe() {
1773
		$noms_erreur = array();
1166
		$noms_erreur = array();
1774
		foreach ($this->noms as &$nom) {
1167
		foreach ($this->noms as &$nom) {
1775
			if ($nom['hybride_parent_01'] != '') {
-
 
1776
				if (!$this->verifierNombre($nom['hybride_parent_01'])) {
-
 
1777
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_01']));
-
 
1778
				}
-
 
1779
			}
-
 
1780
		}
-
 
1781
		
-
 
1782
		// Analyse des résultats
-
 
1783
		if (count($noms_erreur) > 0) {
1168
			if ($nom['hybride_parent_01'] != '') {
1784
			$info['message']['entete'] = array('num_nom', 'hybride_parent_01 erroné');
-
 
1785
			$info['message']['lignes'] = $noms_erreur;
-
 
1786
		} else {
1169
				if (!$this->verifierNombre($nom['hybride_parent_01'])) {
Line 1787... Line 1170...
1787
			$info['resultat'] = true;
1170
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_01']));
1788
		}
1171
				}
1789
		$noms_erreur = null;
1172
			}
1790
		
1173
		}
1791
		$this->traiterResultatTest($info);
-
 
1792
	}
-
 
1793
	
-
 
1794
	/**
1174
		return $noms_erreur;
1795
	 * Test #58
1175
	}
1796
	 */
1176
	
1797
	private function testerHybrideParent01Existence() {
1177
	/**
1798
		$info = $this->getInfosTest(58);
1178
	 * Test #58
1799
		
1179
	 */
1800
		// Réalisation du test
1180
	private function testerHybrideParent01Existence() {
1801
		$noms_erreur = array();
1181
		$noms_erreur = array();
1802
		foreach ($this->noms as &$nom) {
-
 
1803
			if ($nom['hybride_parent_01'] != '' && $nom['hybride_parent_01'] != '0') {
-
 
1804
				if (!isset($this->noms[$nom['hybride_parent_01']])) {
-
 
1805
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_01']));
-
 
1806
				}
-
 
1807
			}
-
 
1808
		}
-
 
1809
		
-
 
1810
		// Analyse des résultats
1182
		foreach ($this->noms as &$nom) {
1811
		if (count($noms_erreur) > 0) {
-
 
1812
			$info['message']['entete'] = array('num_nom', 'hybride_parent_01 introuvable');
-
 
1813
			$info['message']['lignes'] = $noms_erreur;
1183
			if ($nom['hybride_parent_01'] != '' && $nom['hybride_parent_01'] != '0') {
Line 1814... Line 1184...
1814
		} else {
1184
				if (!isset($this->noms[$nom['hybride_parent_01']])) {
1815
			$info['resultat'] = true;
1185
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_01']));
1816
		}
1186
				}
1817
		$noms_erreur = null;
1187
			}
1818
		
-
 
1819
		$this->traiterResultatTest($info);
-
 
1820
	}
-
 
1821
	
1188
		}
1822
	/**
1189
		return $noms_erreur;
1823
	 * Test #59
1190
	}
1824
	 */
1191
	
1825
	private function testerHybrideParent02Syntaxe() {
1192
	/**
1826
		$info = $this->getInfosTest(59);
1193
	 * Test #59
1827
		
1194
	 */
1828
		// Réalisation du test
1195
	private function testerHybrideParent02Syntaxe() {
1829
		$noms_erreur = array();
-
 
1830
		foreach ($this->noms as &$nom) {
-
 
1831
			if ($nom['hybride_parent_02'] != '') {
-
 
1832
				if (!$this->verifierNombre($nom['hybride_parent_02'])) {
-
 
1833
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_02']));
-
 
1834
				}
-
 
1835
			}
-
 
1836
		}
-
 
1837
		
1196
		$noms_erreur = array();
1838
		// Analyse des résultats
-
 
1839
		if (count($noms_erreur) > 0) {
-
 
1840
			$info['message']['entete'] = array('num_nom', 'hybride_parent_02 erroné');
1197
		foreach ($this->noms as &$nom) {
Line 1841... Line 1198...
1841
			$info['message']['lignes'] = $noms_erreur;
1198
			if ($nom['hybride_parent_02'] != '') {
1842
		} else {
1199
				if (!$this->verifierNombre($nom['hybride_parent_02'])) {
1843
			$info['resultat'] = true;
1200
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_02']));
1844
		}
1201
				}
1845
		$noms_erreur = null;
-
 
1846
		
-
 
1847
		$this->traiterResultatTest($info);
-
 
1848
	}
1202
			}
1849
	
1203
		}
1850
	/**
1204
		return $noms_erreur;
1851
	 * Test #60
1205
	}
1852
	 */
1206
	
1853
	private function testerHybrideParent02Existence() {
1207
	/**
1854
		$info = $this->getInfosTest(60);
1208
	 * Test #60
1855
		
1209
	 */
1856
		// Réalisation du test
-
 
1857
		$noms_erreur = array();
-
 
1858
		foreach ($this->noms as &$nom) {
-
 
1859
			if ($nom['hybride_parent_02'] != '') {
-
 
1860
				if (!isset($this->noms[$nom['hybride_parent_02']]) && $nom['hybride_parent_02'] != '0') {
-
 
1861
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_02']));
-
 
1862
				}
-
 
1863
			}
-
 
1864
		}
1210
	private function testerHybrideParent02Existence() {
1865
		
-
 
1866
		// Analyse des résultats
-
 
1867
		if (count($noms_erreur) > 0) {
1211
		$noms_erreur = array();
Line 1868... Line 1212...
1868
			$info['message']['entete'] = array('num_nom', 'hybride_parent_02 introuvable');
1212
		foreach ($this->noms as &$nom) {
1869
			$info['message']['lignes'] = $noms_erreur;
1213
			if ($nom['hybride_parent_02'] != '') {
1870
		} else {
1214
				if (!isset($this->noms[$nom['hybride_parent_02']]) && $nom['hybride_parent_02'] != '0') {
1871
			$info['resultat'] = true;
1215
					$noms_erreur[] = array($nom['num_nom'], $this->repererEspace($nom['hybride_parent_02']));
1872
		}
-
 
1873
		$noms_erreur = null;
-
 
1874
		
-
 
1875
		$this->traiterResultatTest($info);
1216
				}
1876
	}
1217
			}
1877
	
1218
		}
1878
	/**
1219
		return $noms_erreur;
1879
	 * Test #61
1220
	}
1880
	 */
1221
	
1881
	private function testerPresenceSyntaxe() {
1222
	/**
1882
		$info = $this->getInfosTest(61);
1223
	 * Test #61
1883
		
-
 
1884
		// Réalisation du test
-
 
1885
		$noms_erreur = array();
-
 
1886
		foreach ($this->noms as &$nom) {
-
 
1887
			if ($nom['presence'] != '') {
-
 
1888
				if (!$this->verifierPresence($nom['presence'])) {
-
 
1889
					$noms_erreur[] = array($nom['num_nom'], $nom['presence']);
-
 
1890
				}
-
 
1891
			}
1224
	 */
1892
		}
-
 
1893
		
-
 
1894
		// Analyse des résultats
1225
	private function testerPresenceSyntaxe() {
Line 1895... Line 1226...
1895
		if (count($noms_erreur) > 0) {
1226
		$noms_erreur = array();
1896
			$info['message']['entete'] = array('num_nom', 'presence erroné');
1227
		foreach ($this->noms as &$nom) {
1897
			$info['message']['lignes'] = $noms_erreur;
1228
			if ($nom['presence'] != '') {
1898
		} else {
1229
				if (!$this->verifierPresence($nom['presence'])) {
1899
			$info['resultat'] = true;
-
 
1900
		}
-
 
1901
		$noms_erreur = null;
-
 
1902
		
1230
					$noms_erreur[] = array($nom['num_nom'], $nom['presence']);
1903
		$this->traiterResultatTest($info);
1231
				}
1904
	}
1232
			}
1905
	
1233
		}
1906
	/**
1234
		return $noms_erreur;
1907
	 * Test #62
1235
	}
1908
	 */
1236
	
1909
	private function testerStatutOrigineSyntaxe() {
1237
	/**
1910
		$info = $this->getInfosTest(62);
-
 
1911
		
-
 
1912
		// Réalisation du test
-
 
1913
		$noms_erreur = array();
-
 
1914
		foreach ($this->noms as &$nom) {
-
 
1915
			if ($nom['statut_origine'] != '') {
-
 
1916
				if (!$this->verifierStatutOrigine($nom['statut_origine'])) {
-
 
1917
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_origine']);
-
 
1918
				}
1238
	 * Test #62
1919
			}
-
 
1920
		}
-
 
1921
		
1239
	 */
Line 1922... Line 1240...
1922
		// Analyse des résultats
1240
	private function testerStatutOrigineSyntaxe() {
1923
		if (count($noms_erreur) > 0) {
1241
		$noms_erreur = array();
1924
			$info['message']['entete'] = array('num_nom', 'statut_origine erroné');
1242
		foreach ($this->noms as &$nom) {
1925
			$info['message']['lignes'] = $noms_erreur;
1243
			if ($nom['statut_origine'] != '') {
1926
		} else {
-
 
1927
			$info['resultat'] = true;
-
 
1928
		}
-
 
1929
		$noms_erreur = null;
1244
				if (!$this->verifierStatutOrigine($nom['statut_origine'])) {
1930
		
1245
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_origine']);
1931
		$this->traiterResultatTest($info);
1246
				}
1932
	}
1247
			}
1933
	
1248
		}
1934
	/**
1249
		return $noms_erreur;
1935
	 * Test #63
1250
	}
1936
	 */
1251
	
1937
	private function testerStatutIntroductionSyntaxe() {
-
 
1938
		$info = $this->getInfosTest(63);
-
 
1939
		
-
 
1940
		// Réalisation du test
-
 
1941
		$noms_erreur = array();
-
 
1942
		foreach ($this->noms as &$nom) {
-
 
1943
			if ($nom['statut_introduction'] != '') {
-
 
1944
				if (!$this->verifierStatutIntroduction($nom['statut_introduction'])) {
-
 
1945
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_introduction']);
1252
	/**
1946
				}
-
 
1947
			}
-
 
1948
		}
1253
	 * Test #63
Line 1949... Line 1254...
1949
		
1254
	 */
1950
		// Analyse des résultats
1255
	private function testerStatutIntroductionSyntaxe() {
1951
		if (count($noms_erreur) > 0) {
1256
		$noms_erreur = array();
1952
			$info['message']['entete'] = array('num_nom', 'statut_introduction erroné');
1257
		foreach ($this->noms as &$nom) {
1953
			$info['message']['lignes'] = $noms_erreur;
-
 
1954
		} else {
-
 
1955
			$info['resultat'] = true;
-
 
1956
		}
1258
			if ($nom['statut_introduction'] != '') {
1957
		$noms_erreur = null;
1259
				if (!$this->verifierStatutIntroduction($nom['statut_introduction'])) {
1958
		
1260
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_introduction']);
1959
		$this->traiterResultatTest($info);
1261
				}
1960
	}
1262
			}
1961
	
1263
		}
1962
	/**
1264
		return $noms_erreur;
1963
	 * Test #64
1265
	}
1964
	 */
-
 
1965
	private function testerStatutCultureSyntaxe() {
-
 
1966
		$info = $this->getInfosTest(64);
-
 
1967
		
-
 
1968
		// Réalisation du test
-
 
1969
		$noms_erreur = array();
-
 
1970
		foreach ($this->noms as &$nom) {
-
 
1971
			if ($nom['statut_culture'] != '') {
-
 
1972
				if (!$this->verifierStatutCulture($nom['statut_culture'])) {
1266
	
1973
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_culture']);
-
 
1974
				}
-
 
1975
			}
1267
	/**
Line 1976... Line 1268...
1976
		}
1268
	 * Test #64
1977
		
1269
	 */
1978
		// Analyse des résultats
1270
	private function testerStatutCultureSyntaxe() {
1979
		if (count($noms_erreur) > 0) {
1271
		$noms_erreur = array();
1980
			$info['message']['entete'] = array('num_nom', 'statut_culture erroné');
-
 
1981
			$info['message']['lignes'] = $noms_erreur;
-
 
1982
		} else {
-
 
1983
			$info['resultat'] = true;
1272
		foreach ($this->noms as &$nom) {
1984
		}
1273
			if ($nom['statut_culture'] != '') {
1985
		$noms_erreur = null;
1274
				if (!$this->verifierStatutCulture($nom['statut_culture'])) {
1986
		
1275
					$noms_erreur[] = array($nom['num_nom'], $nom['statut_culture']);
1987
		$this->traiterResultatTest($info);
1276
				}
1988
	}
1277
			}
1989
	
1278
		}
1990
	/**
1279
		return $noms_erreur;
1991
	 * Test #65
-
 
1992
	 */
-
 
1993
	private function testerExclureTaxRefSyntaxe() {
-
 
1994
		$info = $this->getInfosTest(65);
-
 
1995
	
-
 
1996
		// Réalisation du testCe n'est pas programmé.
-
 
1997
		$noms_erreur = array();
-
 
1998
		foreach ($this->noms as &$nom) {
-
 
1999
			if ($nom['exclure_taxref'] != '' && $nom['exclure_taxref'] != null) {
1280
	}
2000
				if (!$this->verifierBooleen($nom['exclure_taxref'])) {
-
 
2001
					$noms_erreur[] = array($nom['num_nom'], $nom['exclure_taxref']);
-
 
2002
				}
1281
	
Line 2003... Line 1282...
2003
			}
1282
	/**