Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 1138 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1138 Rev 1142
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
class NomsTest extends ConsultationEflorePhpUnit {
4
class NomsTest extends ConsultationEflorePhpUnit {
5
	
5
	
6
	public function testRechercheEtendue() {
-
 
7
		Registre::set('parametres.referentiel', 'bdtfx');
6
	public function testRechercheEtendue() {
8
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
7
		Registre::set('parametres.referentiel', 'bdtfx');
9
		Config::charger($cheminRacine.'config.ini');
8
		Config::charger(CONFIG_DIR . '/config.ini');
10
		$noms = new Noms();
9
		$noms = new Noms();
11
		$resultats = $noms->getRechercheEtendue('aceras');
10
		$resultats = $noms->getRechercheEtendue('aceras');
12
		$this->assertNotEmpty($resultats);
11
		$this->assertNotEmpty($resultats);
Line 19... Line 18...
19
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
18
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
20
	}
19
	}
Line 21... Line 20...
21
	
20
	
22
	public function testRechercheEtendueDetermination() {
21
	public function testRechercheEtendueDetermination() {
23
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
24
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
22
		Registre::set('parametres.referentiel', 'bdtfx');
25
		Config::charger($cheminRacine.'config.ini');
23
		Config::charger(CONFIG_DIR . '/config.ini');
26
		$noms = new Noms();
24
		$noms = new Noms();
27
		$resultats = $noms->getRechercheEtendue('aceras', 'determination');
25
		$resultats = $noms->getRechercheEtendue('aceras', 'determination');
28
		$this->assertNotEmpty($resultats);
26
		$this->assertNotEmpty($resultats);
29
		$this->assertEquals('15', $resultats['entete']['total']);
27
		$this->assertEquals('15', $resultats['entete']['total']);
Line 35... Line 33...
35
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
33
		$this->assertArrayNotHasKey('biblio_origine', $resultats['resultat']['243']);
36
	}
34
	}
Line 37... Line 35...
37
	
35
	
38
	public function testRechercheEtendueDecompo() {
36
	public function testRechercheEtendueDecompo() {
39
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
40
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
37
		Registre::set('parametres.referentiel', 'bdtfx');
41
		Config::charger($cheminRacine.'config.ini');
38
		Config::charger(CONFIG_DIR . '/config.ini');
42
		$noms = new Noms();
39
		$noms = new Noms();
43
		$resultats = $noms->getRechercheEtendue('aceras', 'decompo');
40
		$resultats = $noms->getRechercheEtendue('aceras', 'decompo');
44
		$this->assertNotEmpty($resultats);
41
		$this->assertNotEmpty($resultats);
45
		$this->assertEquals('15', $resultats['entete']['total']);
42
		$this->assertEquals('15', $resultats['entete']['total']);
Line 51... Line 48...
51
		$this->assertArrayHasKey('biblio_origine', $resultats['resultat']['243']);
48
		$this->assertArrayHasKey('biblio_origine', $resultats['resultat']['243']);
52
	}
49
	}
Line 53... Line 50...
53
	
50
	
54
	public function testRechercheFloue() {
51
	public function testRechercheFloue() {
55
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
56
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
52
		Registre::set('parametres.referentiel', 'bdtfx');
57
		Config::charger($cheminRacine.'config.ini');
53
		Config::charger(CONFIG_DIR . '/config.ini');
58
		$noms = new Noms();
54
		$noms = new Noms();
59
		$resultats = $noms->getRechercheFloue('aceras');
55
		$resultats = $noms->getRechercheFloue('aceras');
60
		$this->assertNotEmpty($resultats);
56
		$this->assertNotEmpty($resultats);
61
		$this->assertEquals('27', $resultats['entete']['total']);
57
		$this->assertEquals('27', $resultats['entete']['total']);