Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 251 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
241 delphine 1
<?php
2
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
3
 
4
class ChorodepObservationsTest extends ServiceEflorePhpUnit {
5
 
6
	public function __construct() {
7
		$this->projet = 'chorodep';
8
		$this->service = 'observations';
9
	}
10
 
11
	public function testValeurChampPrecis() {
12
		$ressources = array('');
13
		$parametres = array();
14
		$url = $this->creerUrl($ressources, $parametres);
15
		$retour = $this->consulterJson($ressources, $parametres);
16
		$this->assertNotEmpty($retour[0], 'données absentes');
17
		$this->assertArrayHasKey('editeur', $retour[0], "Le json ne contient pas d'attribut : editeur. Voir : $url");
18
		$this->assertEquals('Tela Botanica', $retour[0]['editeur'], "L'attribut 'editeur' devrait avoir la valeur 'Tela Botanica'. Voir : $url");
19
		$this->assertArrayNotHasKey('langue', $retour[0], "Le json contient un attribut : langue. Voir : $url");
20
	}
21
}
22
?>