Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 164 → Rev 165

/trunk/tests/metier/NomsTest.php
11,8 → 11,46
$resultats = $noms->getRechercheEtendue('aceras');
$this->assertNotEmpty($resultats);
$this->assertEquals('15', $resultats['entete']['total']);
$this->assertNotEmpty($resultats['resultat']['243']);
$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
$this->assertArrayNotHasKey('nom_retenu.id', $resultats['resultat']['243']);
$this->assertArrayNotHasKey('auteur', $resultats['resultat']['243']);
$this->assertArrayNotHasKey('annee', $resultats['resultat']['243']);
$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
}
public function testRechercheEtendueDetermination() {
Registre::set('parametres.referentiel', 'bdtfx');
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
Config::charger($cheminRacine.'config.ini');
$noms = new Noms();
$resultats = $noms->getRechercheEtendue('aceras', 'determination');
$this->assertNotEmpty($resultats);
$this->assertEquals('15', $resultats['entete']['total']);
$this->assertNotEmpty($resultats['resultat']['243']);
$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
$this->assertEquals('32023', $resultats['resultat']['243']['nom_retenu.id']);
$this->assertArrayNotHasKey('auteur', $resultats['resultat']['243']);
$this->assertArrayNotHasKey('annee', $resultats['resultat']['243']);
$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
}
public function testRechercheEtendueDecompo() {
Registre::set('parametres.referentiel', 'bdtfx');
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
Config::charger($cheminRacine.'config.ini');
$noms = new Noms();
$resultats = $noms->getRechercheEtendue('aceras', 'decompo');
$this->assertNotEmpty($resultats);
$this->assertEquals('15', $resultats['entete']['total']);
$this->assertNotEmpty($resultats['resultat']['243']);
$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
$this->assertArrayNotHasKey('nom_retenu.id', $resultats['resultat']['243']);
$this->assertArrayHasKey('auteur', $resultats['resultat']['243']);
$this->assertArrayHasKey('annee', $resultats['resultat']['243']);
$this->assertArrayHasKey('biblio_origine', $resultats['resultat']['243']);
}
public function testRechercheFloue() {
Registre::set('parametres.referentiel', 'bdtfx');
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
/trunk/tests/metier/NomsVernaculairesTest.php
13,6 → 13,16
$this->assertEquals('3', $resultats['entete']['total']);
}
public function testRechercheEtendueDetermination() {
Registre::set('parametres.referentiel', 'nvjfl');
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
Config::charger($cheminRacine.'config.ini');
$noms = new NomsVernaculaires();
$resultats = $noms->getRechercheEtendue('abricotier', 'determination');
$this->assertNotEmpty($resultats);
$this->assertEquals('3', $resultats['entete']['total']);
}
public function testRechercheFloue() {
Registre::set('parametres.referentiel', 'nvjfl');
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';