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, $ressources, $parametres); |
$this->verifierJsonEnteteBienFormeInformations($retour, $parametres); |
} |
|
private function verifierJsonEnteteBienFormeInformations($retour, $ressources, $parametres) { |
private function verifierJsonEnteteBienFormeInformations($retour, $parametres) { |
//depart |
$this->assertArrayHasKey('depart', $retour['entete'], |
"L'en-tête ne contient pas d'attribut : depart "); |
194,7 → 194,6 |
|
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); |
246,12 → 245,19 |
|
|
public function testJsonInformationsNNBasefor_max() { |
$retour = $this->consulterJson($this->service, $this->projet, ['bdtfx.nn:73256'], ['retour.format' => 'max', 'categorie' => 'description']); |
$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') { |
$this->verifierParametresDescription_max($retour); |
|
$retour = $this->consulterJson($this->service, $this->projet, ['bdtfx.nn:73256'], ['retour.format' => 'max', 'categorie' => 'ecologie']); |
} else { |
$this->verifierParametresEcologie_max($retour, 'baseflor'); |
} |
} |
} |
|
public function testJsonInformationsNNRangSup_max() { |
$ressources = array('bdtfx.nn:101128'); |
329,7 → 335,6 |
|
public function testRelationsCatminat() { |
$ressources = array('bdtfx.nn:5641', 'relations', 'catminat'); |
$parametres = array(); |
$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres); |
|
// valeurs standards |