initialiser(); $recherche->executerRechercheSimple(); $donnees = Registre::get('donneesMoteur'); $resultat = Registre::get('resultats'); $sortie = implode('', $recherche->getSortie()); $this->assertEmpty($donnees, print_r($donnees, true)); $this->assertNotEmpty($resultat, print_r($resultat, true)); $this->assertEquals('6', $resultat['entete']['total']); $this->assertEquals('6', count($resultat['resultat'])); $this->assertArrayNotHasKey('auteur', $resultat['resultat']['182'], print_r($resultat, true)); $this->assertNotEmpty($sortie, print_r($sortie, true)); $this->assertContains('', $sortie); $this->assertContains('Acer monspessulanum', $sortie); } public function testExecuterRechercheSimpleAlphab() { $_GET['type_nom'] = 'nom_scientifique'; $_GET['nom'] = 'acer mons'; $_GET['resultat'] = 'alphab'; $cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/'; Config::charger($cheminRacine.'bdtfx.ini'); Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index'))); Registre::set('parametres.referentiel', 'bdtfx'); $recherche = new Recherche(); $recherche->initialiser(); $recherche->executerRechercheSimple(); $donnees = Registre::get('donneesMoteur'); $resultat = Registre::get('resultats'); $sortie = implode('', $recherche->getSortie()); $this->assertEmpty($donnees, print_r($donnees, true)); $this->assertNotEmpty($resultat, print_r($resultat, true)); $this->assertEquals('6', $resultat['entete']['total']); $this->assertEquals('6', count($resultat['resultat'])); } public function testExecuterRechercheSimpleRetenu() { $_GET['type_nom'] = 'nom_scientifique'; $_GET['nom'] = 'acer mons'; $_GET['resultat'] = 'retenu'; $cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/'; Config::charger($cheminRacine.'bdtfx.ini'); Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index'))); Registre::set('parametres.referentiel', 'bdtfx'); $recherche = new Recherche(); $recherche->initialiser(); $recherche->executerRechercheSimple(); $donnees = Registre::get('donneesMoteur'); $resultat = Registre::get('resultats'); $sortie = implode('', $recherche->getSortie()); $this->assertEmpty($donnees, print_r($donnees, true)); $this->assertNotEmpty($resultat, print_r($resultat, true)); $this->assertEquals('6', $resultat['entete']['total']); $this->assertEquals('6', count($resultat['resultat'])); } public function testExecuterRechercheSimpleSynonyme() { $_GET['type_nom'] = 'nom_scientifique'; $_GET['nom'] = 'acer mons'; $_GET['resultat'] = 'retenu'; $cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/'; Config::charger($cheminRacine.'bdtfx.ini'); Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index'))); Registre::set('parametres.referentiel', 'bdtfx'); $recherche = new Recherche(); $recherche->initialiser(); $recherche->executerRechercheSimple(); $donnees = Registre::get('donneesMoteur'); $resultat = Registre::get('resultats'); $sortie = implode('', $recherche->getSortie()); $this->assertEmpty($donnees, print_r($donnees, true)); $this->assertNotEmpty($resultat, print_r($resultat, true)); $this->assertEquals('6', $resultat['entete']['total']); $this->assertEquals('6', count($resultat['resultat'])); } } ?>