libretime/legacy/tests/application/bootstrap.php

66 lines
2.0 KiB
PHP
Raw Permalink Normal View History

2013-12-18 21:48:32 +01:00
<?php
2021-10-11 16:10:47 +02:00
2013-12-18 21:48:32 +01:00
error_reporting(E_ALL | E_STRICT);
require_once dirname(__DIR__, 2) . '/application/preload.php';
2013-12-18 21:48:32 +01:00
// Ensure library/ is on include_path
2021-10-11 16:10:47 +02:00
set_include_path(implode(PATH_SEPARATOR, [
2013-12-18 21:48:32 +01:00
realpath('./library'),
get_include_path(),
2021-10-11 16:10:47 +02:00
]));
2013-12-18 21:48:32 +01:00
// Ensure library/ is on include_path
2021-10-11 16:10:47 +02:00
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
2021-10-11 16:10:47 +02:00
realpath(APPLICATION_PATH . '/../library'),
]));
// Ensure vendor/ is on the include path
2021-10-11 16:10:47 +02:00
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
2021-09-11 04:20:50 +02:00
realpath(APPLICATION_PATH . '/../vendor'),
2021-10-11 16:10:47 +02:00
realpath(APPLICATION_PATH . '/../vendor/zf1s/zend-loader/library'),
]));
2021-10-11 16:10:47 +02:00
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
realpath(APPLICATION_PATH . '/../vendor/libretime/propel1/runtime/lib'),
2021-10-11 16:10:47 +02:00
]));
// Ensure library/ is on include_path
2021-10-11 16:10:47 +02:00
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
2021-10-11 16:10:47 +02:00
realpath(APPLICATION_PATH . '/../../install_minimal/include'),
]));
Logging::setLogPath(LIBRETIME_LOG_FILEPATH);
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
2014-01-16 23:01:22 +01:00
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());
require_once 'libretime/propel1/runtime/lib/Propel.php';
2021-10-11 16:10:47 +02:00
Propel::init('../application/configs/airtime-conf-production.php');
Zend_Session::start();