Line 1... |
Line 1... |
1 |
<?php
|
1 |
<?php
|
2 |
require_once dirname(__FILE__).'/../ConsultationEflorePhpUnit.php';
|
2 |
require_once dirname(__FILE__).'/../ConsultationEflorePhpUnit.php';
|
Line 3... |
Line 3... |
3 |
|
3 |
|
4 |
class RechercheSimpleTest extends ConsultationEflorePhpUnit {
|
4 |
class RechercheSimpleTest extends ConsultationEflorePhpUnit {
|
5 |
public function testMoteurRechercheSimple() {
|
- |
|
6 |
$moteur = '<!-- DEBUT FORM_NOM -->
|
- |
|
7 |
<script type="text/javascript">
|
- |
|
8 |
<!--
|
- |
|
9 |
var urlServiceAutocompletionNomsSci = "http://localhost/service:eflore:0.1/bdtfx/noms";
|
- |
|
10 |
var urlServiceAutocompletionNomsVerna = "";
|
- |
|
11 |
var urlBaseFicheTaxon = "http://localhost/opt/lampp/bin/phpunit?referentiel=bdtfx&module=fiche&action=fiche&nn={num_taxon}";
|
- |
|
12 |
var valeurDefautNomSci = "Rechercher un nom scientifique";
|
- |
|
13 |
var valeurDefautNomVerna = "Rechercher un nom commun";
|
- |
|
14 |
// -->
|
- |
|
15 |
</script>
|
- |
|
16 |
<form id="ef-form-nomenclature" name="ef-form-nomenclature" action="http://localhost/opt/lampp/bin/phpunit?referentiel=bdtfx&module=fiche&action=fiche&nn={num_taxon}" method="get" class="importance1">
|
- |
|
17 |
<fieldset>
|
- |
|
18 |
<h1>Rechercher une plante</h1>
|
- |
|
19 |
<span class="zone-choix-type-nom">
|
- |
|
20 |
<input id="type-nom-scientifique" name="type_nom" type="hidden" value="nom_scientifique" />
|
- |
|
21 |
Nom scientifique </span>
|
- |
|
22 |
<input id="nom" name="nom" class="champ" size="30" maxlength="255" type="text" autocomplete="off" />
|
- |
|
23 |
<span id="zone-liens-recherche">
|
- |
|
24 |
<input id="referentiel" name="referentiel" type="hidden" value="bdtfx" />
|
- |
|
25 |
<input id="module" name="module" type="hidden" value="recherche" />
|
- |
|
26 |
<input id="action" name="action" type="hidden" value="rechercheSimple" />
|
- |
|
27 |
<input id="eflore_nomenclature_submit" name="submit" type="submit" value="OK" class="ok"/>
|
- |
|
28 |
<input id="eflore_nomenclature_fiche" name="submit" type="submit" value="Accès fiche" />
|
- |
|
29 |
</span>
|
- |
|
30 |
</fieldset>
|
- |
|
31 |
</form>
|
- |
|
32 |
<!-- FIN FORM_NOM -->';
|
- |
|
33 |
|
5 |
public function testMoteurRechercheSimple() {
|
34 |
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
|
6 |
$cheminRacine = realpath(dirname(__FILE__).'/../configurations/').'/';
|
35 |
Config::charger($cheminRacine.'bdtfx.ini');
|
7 |
Config::charger($cheminRacine.'bdtfx.ini');
|
36 |
Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index')));
|
8 |
Registre::set('eFlore.urlBase', new Url(Config::get('base_url_application_index')));
|