Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 229 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 229 Rev 1142
1
<?php
1
<?php
2
require_once dirname(__FILE__).'/../../ConsultationEflorePhpUnit.php';
2
require_once dirname(__FILE__).'/../../ConsultationEflorePhpUnit.php';
3
 
3
 
4
class FicheTest extends ConsultationEflorePhpUnit {
4
class FicheTest extends ConsultationEflorePhpUnit {
-
 
5
 
-
 
6
	/**
-
 
7
	 * @outputBuffering enabled	 # not working ?
-
 
8
	 * (AppControleur::initialiser, prérequis de new Fiche())
5
 
9
	 */
6
	public function testExecuterFichee() {
10
	public function testExecuterFichee() {
7
		$_GET['type_nom'] = 'nom_scientifique';
11
		$_GET['type_nom'] = 'nom_scientifique';
8
		$_GET['nom'] = 'acer mons';
12
		$_GET['nom'] = 'acer mons';
-
 
13
		$_GET['referentiel'] = 'bdtfx';
-
 
14
		$_GET['num_nom'] = '182'; 
9
 
15
 
10
		Registre::set('niveau', '1');
-
 
11
		$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
16
		Registre::set('niveau', '1');
12
		Config::charger($cheminRacine.'bdtfx.ini');
17
		Config::charger(CONFIG_DIR . '/bdtfx.ini');
13
		Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index')));
18
		Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index')));
14
		Registre::set('parametres.referentiel', 'bdtfx');
19
		Registre::set('parametres.referentiel', 'bdtfx');
-
 
20
 
15
 
21
		// @AppControleur::initialiser(); ...
16
		$fiche = new Fiche();
22
		$fiche = new Fiche();
17
		$fiche->executerFiche();
23
		$fiche->executerFiche();
18
		$sortie = $fiche->getSortie();
24
		$sortie = $fiche->getSortie();
19
 
25
 
20
		$this->assertNotEmpty($sortie, print_r($sortie['corps'], true));
26
		$this->assertNotEmpty($sortie, print_r($sortie['corps'], true));
21
		$this->assertContains('<input id="eflore_niveau_nom" name="nom" type="hidden" value="acer mons" />', $sortie['corps']);
27
		$this->assertContains('<input id="eflore_niveau_nom" name="nom" type="hidden" value="acer mons" />', $sortie['corps']);
22
		$this->assertContains('<div id="zone_onglets" ', $sortie['corps']);
28
		$this->assertContains('<div id="zone_onglets" ', $sortie['corps']);
23
	}
29
	}
24
}
30
}
25
?>
31
?>