Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 96 | Rev 195 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 96 Rev 98
Line 11... Line 11...
11
	public function testValeurChampPrecis() {
11
	public function testValeurChampPrecis() {
12
		$ressources = array('fr', 'nom');
12
		$ressources = array('fr', 'nom');
13
		$parametres = array();
13
		$parametres = array();
14
		$url = $this->creerUrl($ressources, $parametres);
14
		$url = $this->creerUrl($ressources, $parametres);
15
		$retour = $this->consulterJson($ressources, $parametres);
15
		$retour = $this->consulterJson($ressources, $parametres);
16
		echo print_r($retour, true).'ici';
-
 
17
		$this->assertArrayHasKey('id', $retour, "Le json ne contient pas d'attribut : id. Voir : $url");
16
		$this->assertArrayHasKey('id', $retour, "Le json ne contient pas d'attribut : id. Voir : $url");
18
		$this->assertEquals('fr', $retour['id'], "L'attribut 'id' devrait avoir la valeur 'fr'. Voir : $url");
17
		$this->assertEquals('fr', $retour['id'], "L'attribut 'id' devrait avoir la valeur 'fr'. Voir : $url");
19
		$this->assertArrayHasKey('nom.fr', $retour, "Le json ne contient pas d'attribut : nom.fr. Voir : $url");
18
		$this->assertArrayHasKey('nom.fr', $retour, "Le json ne contient pas d'attribut : nom.fr. Voir : $url");
20
		$this->assertEquals('Français', $retour['nom.fr'], "L'attribut 'nom.fr' devrait avoir la valeur 'Français'. Voir : $url");
19
		$this->assertEquals('Français', $retour['nom.fr'], "L'attribut 'nom.fr' devrait avoir la valeur 'Français'. Voir : $url");
21
	}
20
	}