Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 60 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60 Rev 129
Line 17... Line 17...
17
			'epithete_sp' => 'triuncialis',
17
			'epithete_sp' => 'triuncialis',
18
            'type_epithete' => 'var.',
18
            'type_epithete' => 'var.',
19
            'epithete_infra_sp' => 'nigroferruginea',
19
            'epithete_infra_sp' => 'nigroferruginea',
20
            'cultivar_groupe' => '',
20
            'cultivar_groupe' => '',
21
            'nom_commercial' => '',
21
            'nom_commercial' => '',
22
            'cultivar' => '');
22
            'cultivar' => '',
-
 
23
			'annee' => '1923',
-
 
24
			'auteur' => 'Popova',
-
 
25
			'biblio_origine' => 'Trudy Prikl. Bot. Selekc., 13 : 476');
23
		$generateur = new GenerateurNomSciHtml();
26
		$generateur = new GenerateurNomSciHtml();
24
		$nomsSciHtml = $generateur->generer($nomsDecomposes);
27
		$nomsSciHtml = $generateur->generer($nomsDecomposes);
25
		$nomSciHtmlGenere = $nomsSciHtml[1009];
28
		$nomSciHtmlGenere = $nomsSciHtml[1009];
26
		$nomSciHtmlAttendu = '<span class=sci><span class="gen">Aegilops</span> <span class="sp">triuncialis</span> <abbr class="type_epithete" title="Variété">var.</abbr> <span class="infra-sp">nigroferruginea</span></span>';
29
		$nomSciHtmlAttendu = '<span class="sci"><span class="gen">Aegilops</span> <span class="sp">triuncialis</span> <abbr class="type_epithete" title="Variété">var.</abbr> <span class="infra-sp">nigroferruginea</span></span>';
-
 
30
		$this->assertEquals($nomSciHtmlAttendu, $nomSciHtmlGenere);
-
 
31
	}
-
 
32
 
-
 
33
	public function testGenererHybride() {
-
 
34
		$nomsDecomposes[] = array(
-
 
35
			'num_nom' => 179,
-
 
36
			'rang' => 290,
-
 
37
			'nom_supra_generique' => '',
-
 
38
			'genre' => 'Acer',
-
 
39
			'epithete_infra_generique' => '',
-
 
40
			'epithete_sp' => 'x martinii',
-
 
41
            'type_epithete' => '',
-
 
42
            'epithete_infra_sp' => '',
-
 
43
            'cultivar_groupe' => '',
-
 
44
            'nom_commercial' => '',
-
 
45
            'cultivar' => '',
-
 
46
			'annee' => '1852',
-
 
47
			'auteur' => 'Jord.',
-
 
48
			'biblio_origine' => 'Pugill. Pl. Nov., 52'
-
 
49
			);
-
 
50
		$generateur = new GenerateurNomSciHtml();
-
 
51
		$nomsSciHtml = $generateur->generer($nomsDecomposes);
-
 
52
		$nomSciHtmlGenere = $nomsSciHtml[179];
-
 
53
		$nomSciHtmlAttendu = '<span class="sci"><span class="gen">Acer</span> <span class="hyb">x <span class="sp">martinii</span></span></span>';
-
 
54
		$this->assertEquals($nomSciHtmlAttendu, $nomSciHtmlGenere);
-
 
55
	}
-
 
56
 
-
 
57
	public function testGenererChimere() {
-
 
58
 
-
 
59
		$nomsDecomposes[] = array(
-
 
60
			'num_nom' => 80380,
-
 
61
			'rang' => 290,
-
 
62
			'nom_supra_generique' => '',
-
 
63
			'genre' => '+ Cytisus',
-
 
64
			'epithete_infra_generique' => '',
-
 
65
			'epithete_sp' => 'adami',
-
 
66
            'type_epithete' => '',
-
 
67
            'epithete_infra_sp' => '',
-
 
68
            'cultivar_groupe' => '',
-
 
69
            'nom_commercial' => '',
-
 
70
            'cultivar' => '',
-
 
71
            'annee' => '1830',
-
 
72
			'auteur' => 'Poit.',
-
 
73
			'biblio_origine' => 'Ann. Soc. Hort. Paris, 7 : 96'
-
 
74
			);
-
 
75
		$generateur = new GenerateurNomSciHtml();
-
 
76
		$nomsSciHtml = $generateur->generer($nomsDecomposes);
-
 
77
		$nomSciHtmlGenere = $nomsSciHtml[80380];
-
 
78
		$nomSciHtmlAttendu = '<span class="sci"><span class="chimere">+ <span class="gen">Cytisus</span></span> <span class="sp">adami</span></span>';
27
		$this->assertEquals($nomSciHtmlAttendu, $nomSciHtmlGenere);
79
		$this->assertEquals($nomSciHtmlAttendu, $nomSciHtmlGenere);
28
	}
80
	}
29
}
81
}
30
?>
82
?>
31
83