Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 553 → Rev 554

/trunk/services/tests/0.1/baseflor/InformationsBaseflorTest.php
310,10 → 310,31
"Le champs '{$chps}_max.href' doit être présent si retour.format=max.");
}
}
}
//++ ------------------------------------Test du champs type biologique -----------------------------++
public function testJsonTypeBioOntologies() {
$ressourcesList = array(array("bdtfx.nn:73256"),array("bdtfx.nn:70441"),array("bdtfx.nn:62911"),array("bdtfx.nn:72496"),
array("bdtfx.nn:6446"),array("bdtfx.nn:8373"), array("bdafx.nn:35574"), array("bdtfx.nn:62443"),
array("bdtfx.nn:62442"));
$parametres = array();
$resultats_attendus = array ('Grhi-aqua' => 'Géophytes (>= 1m) à rhizome (plantes aquatiques) ' ,
'test-aqua-car' => 'Thérophytes (< 1m) estivaux (plantes aquatiques, carnivores) ',
'grhi' => 'Géophytes (< 1m) à rhizome ',
'hsto(test)' => 'Hémicryptophytes (< 1m) stolonifères , Thérophytes (< 1m) estivaux ',
'Hsto-lia(Grhi-lia)' => 'Hémicryptophytes (>= 1m) stolonifères (lianes) , Géophytes (>= 1m) à rhizome (lianes) ',
'Cfru(b-cad)' => 'Chaméphytes (>= 1m) frutescents , Nanophanérophytes (2 à 4m) (caducifoliées) ',
'test-aqua(heri)' => 'Thérophytes (< 1m) estivaux (plantes aquatiques) , Hémicryptophytes (< 1m) érigé ',
'hbis(hsto,test)-suc' => 'Hémicryptophytes (< 1m) bisannuels (succulentes) , Hémicryptophytes (< 1m) stolonifères, Thérophytes (< 1m) estivaux ',
'hbis(hsto)-suc' => 'Hémicryptophytes (< 1m) bisannuels (succulentes) , Hémicryptophytes (< 1m) stolonifères ');
foreach ($ressourcesList as $ressources) {
$retour = $this->consulterJson($ressources, $parametres);
$code = $retour['type_bio.code'];
$this->assertEquals($resultats_attendus[$code], $retour['type_bio.libelle'],
"le traitement de l'ontologie pour les types biologiques est erroné pour $ressources[0] . ");
}
}
}
?>