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');
1142 raphael 8
		Config::charger(CONFIG_DIR . '/config.ini');
99 delphine 9
		$noms = new NomsVernaculaires();
10
		$resultats = $noms->getRechercheEtendue('abricotier');
11
		$this->assertNotEmpty($resultats);
12
		$this->assertEquals('3', $resultats['entete']['total']);
13
	}
14
 
165 delphine 15
	public function testRechercheEtendueDetermination() {
16
		Registre::set('parametres.referentiel', 'nvjfl');
1142 raphael 17
		Config::charger(CONFIG_DIR . '/config.ini');
165 delphine 18
		$noms = new NomsVernaculaires();
19
		$resultats = $noms->getRechercheEtendue('abricotier', 'determination');
20
		$this->assertNotEmpty($resultats);
21
		$this->assertEquals('3', $resultats['entete']['total']);
22
	}
23
 
99 delphine 24
	public function testRechercheFloue() {
25
		Registre::set('parametres.referentiel', 'nvjfl');
1142 raphael 26
		Config::charger(CONFIG_DIR . '/config.ini');
99 delphine 27
		$noms = new NomsVernaculaires();
28
		$resultats = $noms->getRechercheFloue('abricotier');
29
		$this->assertNotEmpty($resultats);
196 delphine 30
		$this->assertEquals('1', $resultats['entete']['total']);
99 delphine 31
	}
32
}
33
?>