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