Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 240 → Rev 241

/trunk/services/tests/0.1/chorodep/ChorodepObservationsTest.php
New file
0,0 → 1,22
<?php
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
 
class ChorodepObservationsTest extends ServiceEflorePhpUnit {
 
public function __construct() {
$this->projet = 'chorodep';
$this->service = 'observations';
}
 
public function testValeurChampPrecis() {
$ressources = array('');
$parametres = array();
$url = $this->creerUrl($ressources, $parametres);
$retour = $this->consulterJson($ressources, $parametres);
$this->assertNotEmpty($retour[0], 'données absentes');
$this->assertArrayHasKey('editeur', $retour[0], "Le json ne contient pas d'attribut : editeur. Voir : $url");
$this->assertEquals('Tela Botanica', $retour[0]['editeur'], "L'attribut 'editeur' devrait avoir la valeur 'Tela Botanica'. Voir : $url");
$this->assertArrayNotHasKey('langue', $retour[0], "Le json contient un attribut : langue. Voir : $url");
}
}
?>