Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 164 Rev 205
Line 1... Line 1...
1
<?php
1
<?php
Line 2... Line 2...
2
 
2
 
3
class ResultatFormateurInitialisation extends PHPUnit_Framework_TestCase {
3
class ResultatFormateurInitialisation extends PHPUnit_Framework_TestCase {
-
 
4
	const TPL_URL_FICHE = 'http://localhost/eflore/eflore-consultation/index_botanique.php?referentiel=bdtfx&module=fiche&action=fiche&nn=%s';
4
	const TPL_URL_FICHE = 'http://localhost/eflore/eflore-consultation/index_botanique.php?referentiel=bdtfx&module=fiche&action=fiche&nn=%s';
5
	const TPL_URL_BASE_DOSSIER = 'http://localhost/eflore-consultation/';
5
 
6
	
6
	public static function setUpBeforeClass() {
7
	public static function setUpBeforeClass() {
Line 7... Line 8...
7
		error_reporting(E_ALL);
8
		error_reporting(E_ALL);
8
 
9
 
Line 49... Line 50...
49
		$trieur = new Trieur();
50
		$trieur = new Trieur();
50
		return $trieur;
51
		return $trieur;
51
	}
52
	}
Line 52... Line 53...
52
 
53
 
53
	protected function getAppUrls() {
54
	protected function getAppUrls() {
54
		$AppUrls = $this->getMock('AppUrls', array('obtenirUrlFiche'), array(), '', false);
55
		$AppUrls = $this->getMock('AppUrls', array('obtenirUrlFiche', 'obtenirUrlBaseDossier'), array(), '', false);
55
		$AppUrls->expects($this->any())
56
		$AppUrls->expects($this->any())
56
		->method('obtenirUrlFiche')
57
		->method('obtenirUrlFiche')
-
 
58
		->will($this->returnCallback(array($this, 'genererUrlFiche')));
-
 
59
		$AppUrls->expects($this->any())
-
 
60
		->method('obtenirUrlBaseDossier')
57
		->will($this->returnCallback(array($this, 'genererUrlFiche')));
61
		->will($this->returnCallback(array($this, 'genererUrlBaseDossier')));
58
		return $AppUrls;
62
		return $AppUrls;
Line 59... Line 63...
59
	}
63
	}
60
 
64
 
61
	public function genererUrlFiche($id) {
65
	public function genererUrlFiche($id) {
-
 
66
		return sprintf(self::TPL_URL_FICHE, $id);
-
 
67
	}
-
 
68
	
-
 
69
	public function genererUrlBaseDossier() {
62
		return sprintf(self::TPL_URL_FICHE, $id);
70
		return self::TPL_URL_BASE_DOSSIER;
63
	}
71
	}
64
}
72
}