Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 825 → Rev 824

/trunk/services/tests/0.1/baseflor/InformationsBaseflorTest.php
2,6 → 2,8
 
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
 
/* TO DO = ajouter un test pour Informations/id/Relations/catminat */
 
class InformationsBaseflorTest extends ServiceEflorePhpUnit {
public function __construct() {
332,36 → 334,6
"le traitement de l'ontologie pour les types biologiques est erroné pour $ressources[0] . ");
}
}
 
public function testRelationsCatminat() {
$ressources = array('bdtfx.nn:5641', 'relations', 'catminat');
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
 
// valeurs standards
$this->assertArrayHasKey('cle',$retour, "Le champ 'cle' doit être présent.");
$this->assertEquals('1693',$retour['cle'], "Le champ 'cle' est erroné.");
 
$this->assertArrayHasKey('num_nomen',$retour, "Le champ 'num_nomen' doit être présent.");
$this->assertEquals('5641',$retour['num_nomen'], "Le champ 'num_nomen' est erroné.");
 
$this->assertArrayHasKey('bdnt',$retour, "Le champ 'bdnt' doit être présent.");
$this->assertEquals('bdtfx',$retour['bdnt'], "Le champ 'bdnt' est erroné.");
 
// valeurs écologiques, test libelle
$this->assertArrayHasKey('ve_texture_sol_min.libelle',$retour, "Le champ 've_texture_sol_min.libelle' doit être présent.");
$this->assertEquals('intermédiaire',$retour['ve_texture_sol_min.libelle'], "Le champ 've_texture_sol_min.libelle' est erroné.");
 
$this->assertArrayHasKey('ve_humidite_atmos_min.code',$retour, "Le champ 've_humidite_atmos_min.code' doit être présent.");
$this->assertEquals('8',$retour['ve_humidite_atmos_min.code'], "Le champ 've_texture_sol_min.libelle' est erroné.");
 
// climat
$this->assertArrayHasKey('graphique_climat',$retour, "Le champ 'graphique_climat' doit être présent.");
$this->assertArrayHasKey('libelle',$retour['graphique_climat'], "Le champ 'graphique_climat > libelle' doit être présent.");
$this->assertArrayHasKey('href',$retour['graphique_climat'], "Le champ 'graphique_climat > href' doit être présent.");
$this->assertEquals('climat',$retour['graphique_climat']['libelle'], "Le champ 'graphique_climat > href' doit être présent.");
}
 
// TODO = ajouter un test pour Informations/id/Relations/catminat?navigation.limite=500&navigation.depart=0
}
?>