sintonia/airtime_mvc/tests/application/bootstrap.php
Albert Santoni 11c6818e61 Merge branch '2.5.x-installer' into saas-installer-albert
Conflicts:
	.gitignore
	airtime_mvc/application/Bootstrap.php
	airtime_mvc/application/configs/conf.php
	airtime_mvc/application/controllers/SystemstatusController.php
	airtime_mvc/application/controllers/UpgradeController.php
	airtime_mvc/application/upgrade/Upgrades.php
	airtime_mvc/application/views/scripts/systemstatus/index.phtml
	airtime_mvc/build/airtime.conf
	airtime_mvc/build/sql/defaultdata.sql
	airtime_mvc/public/index.php
	airtime_mvc/tests/application/helpers/AirtimeInstall.php
	install_minimal/airtime-install
	install_minimal/include/airtime-constants.php
	install_minimal/include/airtime-copy-files.sh
	install_minimal/include/airtime-db-install.php
	install_minimal/include/airtime-initialize.sh
	install_minimal/include/airtime-install.php
	install_minimal/include/airtime-installed-check.php
	install_minimal/include/airtime-remove-files.sh
	install_minimal/include/airtime-upgrade.php
	python_apps/media-monitor/install/media-monitor-copy-files.py
	python_apps/monit/monit-airtime-generic.cfg
	python_apps/pypo/airtime-playout
	python_apps/pypo/install/pypo-copy-files.py
	python_apps/pypo/liquidsoap/generate_liquidsoap_cfg.py
	python_apps/pypo/liquidsoap/ls_script.liq
	python_apps/pypo/pypo/__main__.py
	python_apps/pypo/pypo/media/update/replaygain.py
	python_apps/pypo/pypo/media/update/replaygainupdater.py
	python_apps/pypo/pypo/media/update/silananalyzer.py
	python_apps/python-virtualenv/airtime_virtual_env.pybundle
	python_apps/python-virtualenv/requirements
	utils/airtime-check-system.php
2015-05-22 16:05:29 -04:00

88 lines
2.9 KiB
PHP

<?php
error_reporting(E_ALL | E_STRICT);
// Define path to application directory
defined('APPLICATION_PATH')
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application/'));
// Define path to configs directory
define('CONFIG_PATH', APPLICATION_PATH . '/configs/');
// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'testing'));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
realpath('./library'),
get_include_path(),
)));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../library')
)));
// Ensure vendor/ is on the include path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../../vendor')
)));
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../../vendor/propel/propel1/runtime/lib')
)));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../../install_minimal/include')
)));
require_once (APPLICATION_PATH."/logging/Logging.php");
Logging::setLogPath('/var/log/airtime/zendphp.log');
set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
//Propel classes.
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
//Services
set_include_path(APPLICATION_PATH . '/services' . PATH_SEPARATOR . get_include_path());
//models
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
//Controllers.
set_include_path(APPLICATION_PATH . '/controllers' . PATH_SEPARATOR . get_include_path());
//Controller plugins.
set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path());
//test data
set_include_path(APPLICATION_PATH . '/../tests/application/testdata' . PATH_SEPARATOR . get_include_path());
//helper functions
set_include_path(APPLICATION_PATH . '/../tests/application/helpers' . PATH_SEPARATOR . get_include_path());
//cloud storage files
set_include_path(APPLICATION_PATH . '/cloud_storage' . PATH_SEPARATOR . get_include_path());
//Zend framework
if (file_exists('/usr/share/php/libzend-framework-php')) {
set_include_path('/usr/share/php/libzend-framework-php' . PATH_SEPARATOR . get_include_path());
set_include_path('/usr/share/php/libzend-framework-php/Zend/Test/PHPUnit' . PATH_SEPARATOR . get_include_path());
}
require_once 'Zend/Application.php';
require_once 'Zend/Config.php';
require_once APPLICATION_PATH.'/configs/conf.php';
require_once 'propel/propel1/runtime/lib/Propel.php';
Propel::init("../application/configs/airtime-conf-production.php");
require_once 'Zend/Session.php';
Zend_Session::start();