Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 98 → Rev 99

/trunk/tests/metier/EfloreTest.php
New file
0,0 → 1,20
<?php
require_once dirname(__FILE__).'/../ConsultationEflorePhpUnit.php';
 
class EfloreTest extends ConsultationEflorePhpUnit {
public function testFormulerUrl() {
$ressources = array('bdtfx', 'noms');
$parametres = array('masque' => 'acer', 'recherche' => 'stricte', 'ns.format' => 'htm');
$url = $this->creerUrl($ressources, $parametres);
$eflore = $this->getMock('Eflore');
$formaterUrl = self::getMethodeProtegee($eflore, 'formaterUrl');
$tpl = 'http://localhost/service:eflore:0.1/{projet}/noms?masque={valeur}&recherche={type}&ns.format=htm';
$param = array('projet' => 'bdtfx' ,'valeur' => 'acer', 'type' => 'stricte');
$urlf = $formaterUrl->invoke($eflore, $tpl, $param);
$this->assertEquals($url, $urlf);
}
}
?>