2013-12-18 21:48:32 +01:00
|
|
|
<?php
|
|
|
|
error_reporting(E_ALL | E_STRICT);
|
|
|
|
|
|
|
|
// Define path to application directory
|
|
|
|
defined('APPLICATION_PATH')
|
|
|
|
|| define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../../application'));
|
|
|
|
|
|
|
|
// 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(),
|
|
|
|
)));
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
// Ensure library/ is on include_path
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../library')
|
|
|
|
)));
|
|
|
|
|
2013-12-19 21:31:12 +01:00
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../library/propel/runtime/lib')
|
|
|
|
)));
|
|
|
|
|
2013-12-19 17:16:06 +01:00
|
|
|
// Ensure library/ is on include_path
|
|
|
|
set_include_path(implode(PATH_SEPARATOR, array(
|
|
|
|
get_include_path(),
|
|
|
|
realpath(APPLICATION_PATH . '/../../install_minimal/include')
|
|
|
|
)));
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
|
|
|
//Propel classes.
|
|
|
|
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-19 17:16:06 +01:00
|
|
|
//Services
|
|
|
|
set_include_path(APPLICATION_PATH . '/services' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
//Controller plugins.
|
|
|
|
set_include_path(APPLICATION_PATH . '/controllers/plugins' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2014-01-07 00:08:57 +01:00
|
|
|
//test data
|
|
|
|
set_include_path(APPLICATION_PATH . '/../tests/application/testdata' . PATH_SEPARATOR . get_include_path());
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
//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());
|
|
|
|
}
|
|
|
|
|
2013-12-18 21:48:32 +01:00
|
|
|
require_once 'Zend/Application.php';
|
2013-12-18 23:40:13 +01:00
|
|
|
require_once 'Zend/Config.php';
|
2013-12-19 21:31:12 +01:00
|
|
|
|
|
|
|
require_once APPLICATION_PATH.'/configs/conf.php';
|
|
|
|
require_once 'propel/runtime/lib/Propel.php';
|
|
|
|
Propel::init("../application/configs/airtime-conf-production.php");
|
|
|
|
|
2013-12-18 22:05:31 +01:00
|
|
|
#require_once 'DatabaseTestCase.php';
|
2013-12-19 17:40:35 +01:00
|
|
|
require_once 'Zend/Session.php';
|
|
|
|
Zend_Session::start();
|