Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 240 | Rev 785 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 240 Rev 784
Line 2... Line 2...
2
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
2
require_once dirname(__FILE__).'/../ServiceEflorePhpUnit.php';
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
class CommunAideTest extends ServiceEflorePhpUnit {
4
class CommunAideTest extends ServiceEflorePhpUnit {
5
 
5
 
6
	public function __construct() {
6
	public function __construct() {
7
		$this->projet = 'commun';
7
		$this->projet = 'eflore';
Line 8... Line 8...
8
		$this->service = 'aide';
8
		$this->service = 'aide';
9
	}
9
	}
10
 
10
 
11
	public function testAideSurCommun() {
11
	public function testAideSurCommun() {
12
		$ressources = array();
12
		$ressources = array();
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
		$this->assertNotEmpty($retour['PROJET COMMUN'], 'données absentes');
16
		$this->assertNotEmpty($retour['PROJET EFLORE'], 'données absentes');
Line 17... Line 17...
17
		$this->assertArrayHasKey('service.nom', $retour['PROJET COMMUN']['projet.services'][0], "Le json ne contient pas d'attribut : editeur. Voir : $url");
17
		$this->assertArrayHasKey('service.nom', $retour['PROJET EFLORE']['projet.services'][0], "Le json ne contient pas d'attribut : editeur. Voir : $url");
18
		$this->assertEquals('ontologies', $retour['PROJET COMMUN']['projet.services'][0]['service.nom'], "L'attribut 'editeur' devrait avoir la valeur 'Tela Botanica'. Voir : $url");
18
		$this->assertEquals('ontologies', $retour['PROJET EFLORE']['projet.services'][0]['service.nom'], "L'attribut 'editeur' devrait avoir la valeur 'Tela Botanica'. Voir : $url");
19
	}
19
	}