Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 196 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
99 delphine 1
<?php
2
require_once dirname(__FILE__).'/../ConsultationEflorePhpUnit.php';
3
 
4
class NomsVernaculairesTest extends ConsultationEflorePhpUnit {
5
 
6
	public function testRechercheEtendue() {
7
		Registre::set('parametres.referentiel', 'nvjfl');
8
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
9
		Config::charger($cheminRacine.'config.ini');
10
		$noms = new NomsVernaculaires();
11
		$resultats = $noms->getRechercheEtendue('abricotier');
12
		$this->assertNotEmpty($resultats);
13
		$this->assertEquals('3', $resultats['entete']['total']);
14
	}
15
 
165 delphine 16
	public function testRechercheEtendueDetermination() {
17
		Registre::set('parametres.referentiel', 'nvjfl');
18
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
19
		Config::charger($cheminRacine.'config.ini');
20
		$noms = new NomsVernaculaires();
21
		$resultats = $noms->getRechercheEtendue('abricotier', 'determination');
22
		$this->assertNotEmpty($resultats);
23
		$this->assertEquals('3', $resultats['entete']['total']);
24
	}
25
 
99 delphine 26
	public function testRechercheFloue() {
27
		Registre::set('parametres.referentiel', 'nvjfl');
28
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
29
		Config::charger($cheminRacine.'config.ini');
30
		$noms = new NomsVernaculaires();
31
		$resultats = $noms->getRechercheFloue('abricotier');
32
		$this->assertNotEmpty($resultats);
196 delphine 33
		$this->assertEquals('1', $resultats['entete']['total']);
99 delphine 34
	}
35
}
36
?>