Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 240 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
240 delphine 1
<?php
2
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
3
 
4
class CommunMetaDonneesTest extends ServiceEflorePhpUnit {
5
 
6
	public function __construct() {
7
		$this->projet = 'commun';
8
		$this->service = 'meta-donnees';
9
	}
10
 
11
	public function testValeurChampPrecis() {
12
		$ressources = array('editeur');
13
		$parametres = array();
790 raphael 14
		$url = ServiceEflorePhpUnit::creerUrl($this->service, $ressources, $parametres);
15
		$retour = $this->consulterJson($this->service, $this->projet, $ressources, $parametres);
240 delphine 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
?>