14,8 → 14,13 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL |
*/ |
|
define('CONFIG_DIR', __DIR__ . '/../configurations'); |
require_once __DIR__ . '/../framework.php'; |
abstract class ConsultationEflorePhpUnit extends PHPUnit_Framework_TestCase { |
const URL_API = 'http://localhost/service:eflore:0.1'; |
const TPL_URL_BASE = 'http://localhost/consultation/index_botanique.php?referentiel=bdtfx'; |
const TPL_URL_BASE_DOSSIER = 'http://localhost/consultation/'; |
const TPL_URL_FICHE = 'http://localhost/consultation/index_botanique.php?referentiel=bdtfx&module=fiche&action=fiche&nn=%s'; |
|
//+------------------------------------------------------------------------------------------------------+ |
// Intialisation |
48,9 → 53,11 |
} |
|
$cheminsTests = __DIR__.'/'; |
// $cheminBibliotheque = realpath(__DIR__.'/../bibliotheque/').'/'; |
$cheminMetier = realpath(__DIR__.'/../metier/api_0.1').'/'; |
$cheminModule = realpath(__DIR__.'/../modules/').'/'; |
$chemins = array($cheminMetier, $cheminModule, $cheminsTests); |
$cheminFormateurs = realpath(__DIR__.'/../modules/fiche/formateurs/').'/'; // pour FicheTest::testExecuterFiche() |
$chemins = array(/* $cheminBibliotheque, */ $cheminMetier, $cheminModule, $cheminsTests, $cheminFormateurs); |
foreach ($chemins as $chemin) { |
$cheminCourt = $chemin.$classe.'.php'; |
$module = strtolower(preg_replace('/([A-Z])/', '_\\1', lcfirst($classe))); |
97,7 → 104,7 |
$parametresUrl = '?'.implode('&', $parametresUrl); |
} |
|
return 'http://localhost/service:eflore:0.1'.$ressourcesUrl.$parametresUrl; |
return self::URL_API.$ressourcesUrl.$parametresUrl; |
} |
|
//+------------------------------------------------------------------------------------------------------+ |