Newer
Older
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
chdir(realpath(dirname(__FILE__)).'/../');
error_reporting(E_ALL^E_DEPRECATED);
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
ini_set('memory_limit', '3072M');
date_default_timezone_set('Europe/Paris');
set_include_path( realpath(dirname(__FILE__)).'/../library'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../library/digital_resources'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../library/templates'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/library/Class'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../library/Class'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/library/'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../library/ZendAfi'
. PATH_SEPARATOR . './library/storm/src'
. PATH_SEPARATOR . './library/storm/tests'
. PATH_SEPARATOR . './library/storm/zf/library'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/../application/modules'
. PATH_SEPARATOR . realpath(dirname(__FILE__)).'/application/modules'
. PATH_SEPARATOR . realpath(dirname(__FILE__))
. PATH_SEPARATOR . get_include_path());
include_once( "fonctions/fonctions.php");
require_once "Zend/Loader.php";
$path = dirname(__FILE__);
$parts = explode(DIRECTORY_SEPARATOR, $path);
$parts = array_reverse($parts);
defineConstant("BASE_URL", "/" . $parts[1]);
defineConstant("URL_IMG", BASE_URL . "/public/opac/skins/original/images/");
defineConstant("URL_SHARED_IMG", BASE_URL . "/public/opac/images/");
$_SERVER['SERVER_NAME'] = 'localhost';
$_SERVER['SERVER_PORT'] = '80';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['HTTP_HOST'] = 'localhost';
Class_ICal_Autoloader::getInstance()->ensureAutoload();
(new Storm_Cache())->getCache()->setOption('caching', true);
$db_cache = Zend_Cache::factory('Core',
'File',
['lifetime' => 300 ,
'automatic_serialization' => true],
['cache_dir' => PATH_TEMP ]);
Zend_Db_Table_Abstract::setDefaultMetadataCache($db_cache);
$cfg = new Zend_Config(Zend_Registry::get('cfg')->toArray(), true);
$cfg->amber = new Zend_Config(array('deploy' => false));

llaffont
committed
$translate = Zend_Registry::get('translate');
$translate->addTranslation(LANG_DIR.'ro.mo', 'ro');
$translate->addTranslation(LANG_DIR.'en.mo', 'en');
$translate->addTranslation(LANG_DIR.'es.mo', 'es');
$translate->addTranslation(LANG_DIR.'fr.mo', 'fr');
$translate->setLocale('fr');

Patrick Barroca
committed
require_once 'tests/library/ZendAfi/View/Helper/ViewHelperTestCase.php';
require_once 'tests/application/modules/admin/controllers/AdminAbstractControllerTestCase.php';
require_once 'tests/library/Class/ModelTestCase.php';
require_once 'tests/library/Class/WebService/SIGB/TestingService.php';

Patrick Barroca
committed
require_once 'tests/fixtures/RessourcesNumeriquesFixtures.php';
require_once 'tests/application/modules/telephone/controllers/TelephoneAbstractControllerTestCase.php';
require_once 'tests/js/BrowserTest.php';
register_shutdown_function(function(){