Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Regard whitespace Rev 946 → Rev 947

/trunk/services/tests/0.1/baseflor/InformationsBaseflorTest.php
98,7 → 98,7
$ressources = array();
$parametresList = array(
array('navigation.depart' => -5, 'navigation.limite' => 10 ),
array('navigation.depart' => 0, 'navigation.limite' => abc ));
array('navigation.depart' => 0, 'navigation.limite' => 'abc' ));
$cles = array('navigation.depart','navigation.limite');
$i = 0 ;
foreach ($parametresList as $parametres) {
147,10 → 147,10
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
$this->assertArrayHasKey('entete', $retour, "Le json ne contient pas d'attribut : entete. Voir : $url");
$this->assertArrayHasKey('resultats', $retour, "Le json ne contient pas d'attribut : resultat. Voir : $url");
$this->verifierJsonEnteteBienFormeInformations($retour, $parametres);
$this->verifierJsonEnteteBienFormeInformations($retour, $ressources, $parametres);
}
private function verifierJsonEnteteBienFormeInformations($retour, $parametres) {
private function verifierJsonEnteteBienFormeInformations($retour, $ressources, $parametres) {
//depart
$this->assertArrayHasKey('depart', $retour['entete'],
"L'en-tĂȘte ne contient pas d'attribut : depart ");
194,6 → 194,7
public function testJsonNombreLimiteDemande() {
$ressources = array();
$parametres = array();
$parametresList = array('navigation.depart' => 10, 'navigation.limite' => 15 );
$url = ServiceEflorePhpUnit::creerUrl($this->service, $ressources, $parametres);
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
245,19 → 246,12
public function testJsonInformationsNNBasefor_max() {
$ressources = array('bdtfx.nn:73256');
$parametresList = array(
array('retour.format' => 'max', 'categorie' => 'description'),
array('retour.format' => 'max' , 'categorie' => 'ecologie'));
foreach ($parametresList as $parametres) {
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
if ($parametres['categorie'] == 'description') {
$retour = $this->consulterJson($this->service, $this->projet, ['bdtfx.nn:73256'], ['retour.format' => 'max', 'categorie' => 'description']);
$this->verifierParametresDescription_max($retour);
} else {
 
$retour = $this->consulterJson($this->service, $this->projet, ['bdtfx.nn:73256'], ['retour.format' => 'max', 'categorie' => 'ecologie']);
$this->verifierParametresEcologie_max($retour, 'baseflor');
}
}
}
public function testJsonInformationsNNRangSup_max() {
$ressources = array('bdtfx.nn:101128');
335,6 → 329,7
 
public function testRelationsCatminat() {
$ressources = array('bdtfx.nn:5641', 'relations', 'catminat');
$parametres = array();
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
 
// valeurs standards