Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 99 | Rev 1138 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 99 Rev 165
Line 9... Line 9...
9
		Config::charger($cheminRacine.'config.ini');
9
		Config::charger($cheminRacine.'config.ini');
10
		$noms = new Noms();
10
		$noms = new Noms();
11
		$resultats = $noms->getRechercheEtendue('aceras');
11
		$resultats = $noms->getRechercheEtendue('aceras');
12
		$this->assertNotEmpty($resultats);
12
		$this->assertNotEmpty($resultats);
13
		$this->assertEquals('15', $resultats['entete']['total']);
13
		$this->assertEquals('15', $resultats['entete']['total']);
-
 
14
		$this->assertNotEmpty($resultats['resultat']['243']);
-
 
15
		$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
-
 
16
		$this->assertArrayNotHasKey('nom_retenu.id', $resultats['resultat']['243']);
-
 
17
		$this->assertArrayNotHasKey('auteur', $resultats['resultat']['243']);
-
 
18
		$this->assertArrayNotHasKey('annee', $resultats['resultat']['243']);
-
 
19
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
-
 
20
	}
-
 
21
	
-
 
22
	public function testRechercheEtendueDetermination() {
-
 
23
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
24
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
-
 
25
		Config::charger($cheminRacine.'config.ini');
-
 
26
		$noms = new Noms();
-
 
27
		$resultats = $noms->getRechercheEtendue('aceras', 'determination');
-
 
28
		$this->assertNotEmpty($resultats);
-
 
29
		$this->assertEquals('15', $resultats['entete']['total']);
-
 
30
		$this->assertNotEmpty($resultats['resultat']['243']);
-
 
31
		$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
-
 
32
		$this->assertEquals('32023', $resultats['resultat']['243']['nom_retenu.id']);
-
 
33
		$this->assertArrayNotHasKey('auteur', $resultats['resultat']['243']);
-
 
34
		$this->assertArrayNotHasKey('annee', $resultats['resultat']['243']);
-
 
35
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
-
 
36
	}
-
 
37
	
-
 
38
	public function testRechercheEtendueDecompo() {
-
 
39
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
40
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
-
 
41
		Config::charger($cheminRacine.'config.ini');
-
 
42
		$noms = new Noms();
-
 
43
		$resultats = $noms->getRechercheEtendue('aceras', 'decompo');
-
 
44
		$this->assertNotEmpty($resultats);
-
 
45
		$this->assertEquals('15', $resultats['entete']['total']);
-
 
46
		$this->assertNotEmpty($resultats['resultat']['243']);
-
 
47
		$this->assertEquals('Aceras hircina', $resultats['resultat']['243']['nom_sci']);
-
 
48
		$this->assertArrayNotHasKey('nom_retenu.id', $resultats['resultat']['243']);
-
 
49
		$this->assertArrayHasKey('auteur', $resultats['resultat']['243']);
-
 
50
		$this->assertArrayHasKey('annee', $resultats['resultat']['243']);
-
 
51
		$this->assertArrayHasKey('biblio_origine', $resultats['resultat']['243']);
14
	}
52
	}
Line 15... Line 53...
15
	
53
	
16
	public function testRechercheFloue() {
54
	public function testRechercheFloue() {
17
		Registre::set('parametres.referentiel', 'bdtfx');
55
		Registre::set('parametres.referentiel', 'bdtfx');