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 |
|
|
|
16 |
public function testRechercheFloue() {
|
|
|
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->getRechercheFloue('abricotier');
|
|
|
22 |
$this->assertNotEmpty($resultats);
|
|
|
23 |
$this->assertEquals('5', $resultats['entete']['total']);
|
|
|
24 |
}
|
|
|
25 |
}
|
|
|
26 |
?>
|