Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 99 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
99 delphine 1
<?php
2
require_once dirname(__FILE__).'/../ConsultationEflorePhpUnit.php';
3
 
4
class EfloreTest extends ConsultationEflorePhpUnit {
5
 
6
	public function testFormulerUrl() {
7
		$ressources = array('bdtfx', 'noms');
8
		$parametres = array('masque' => 'acer', 'recherche' => 'stricte', 'ns.format' => 'htm');
9
		$url = $this->creerUrl($ressources, $parametres);
10
 
11
		$eflore = $this->getMock('Eflore');
12
		$formaterUrl = self::getMethodeProtegee($eflore, 'formaterUrl');
1142 raphael 13
		$tpl = ConsultationEflorePhpUnit::URL_API . '/{projet}/noms?masque={valeur}&recherche={type}&ns.format=htm';
99 delphine 14
		$param = array('projet' => 'bdtfx' ,'valeur' => 'acer', 'type' => 'stricte');
15
		$urlf = $formaterUrl->invoke($eflore, $tpl, $param);
16
 
17
		$this->assertEquals($url, $urlf);
18
	}
19
}
20
?>