Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev 203 Rev 206
Line 1... Line 1...
1
<?php
1
<?php
2
require_once dirname(__FILE__).'/../ServicePhpUnit.php';
2
require_once dirname(__FILE__).'/../ServicePhpUnit.php';
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
class NomDetailsBdtfxTest extends ServicePhpUnit {
4
class NomDetailsBdtfxTest extends ServicePhpUnit {
5
 
5
 
6
	private $nomDetailSqueletteUrl = 'http://localhost/service:eflore:0.1/bdtfx/noms/%s';
6
	private $nomDetailSqueletteUrl = 'http://localhost/service:eflore:0.2/bdtfx/noms/%s';
7
	private $ontologieHrefTpl = 'http://localhost/service:eflore:0.1/bdnt/ontologies/rangTaxo:%s';
7
	private $ontologieHrefTpl = 'http://localhost/service:eflore:0.2/bdnt/ontologies/rangTaxo:%s';
8
	private $champsProjet = array(
8
	private $champsProjet = array(
9
		'presence_Ga' => 'presence_Ga.code',
9
		'presence_Ga' => 'presence_Ga.code',
Line 10... Line 10...
10
		'presence_Co' => 'presence_Co.code'
10
		'presence_Co' => 'presence_Co.code'
11
		);
11
		);
12
 
12
 
13
	public function __construct() {
13
	public function __construct() {
14
		$this->projet = 'bdtfx';
14
		$this->projet = 'bdtfx';
Line 15... Line 15...
15
		$this->service = 'noms';
15
		$this->service = 'noms';
16
		$this->classeTestee = 'NomDetailsBdtfx';
16
		$this->classeTestee = 'NomDetailsGenerique';
17
	}
17
	}
Line 24... Line 24...
24
 
24
 
25
	public function testSansParametres() {
25
	public function testSansParametres() {
26
		$ressources = array('85');
26
		$ressources = array('85');
Line 27... Line 27...
27
		$parametres = array();
27
		$parametres = array();
Line 28... Line 28...
28
 
28
 
29
		$retour = $this->consulterBrut($ressources, $parametres);
29
		$retour = $this->consulter($ressources, $parametres);
30
 
30
 
31
		$this->assertTrue(is_array($retour), 'Retour est un tableau');
31
		$this->assertTrue(is_array($retour), 'Retour est un tableau');
Line 67... Line 67...
67
 
67
 
68
	public function testNomSansCorrespondance() {
68
	public function testNomSansCorrespondance() {
69
		$ressources = array('98940');
69
		$ressources = array('98940');
Line 70... Line 70...
70
		$parametres = array();
70
		$parametres = array();
Line 71... Line 71...
71
 
71
 
72
		$retour = $this->consulterBrut($ressources, $parametres);
72
		$retour = $this->consulter($ressources, $parametres);
73
 
73
 
74
		$this->assertArrayNotHasKey('nom_retenu.id', $retour, 'Abscence champ nom_retenu.id');
74
		$this->assertArrayNotHasKey('nom_retenu.id', $retour, 'Abscence champ nom_retenu.id');