Fixed unit tests by including the vendor directory for propel files, and the cloud_storage directory

This commit is contained in:
drigato 2015-01-27 10:53:58 -05:00
parent 8d4f94a41f
commit 648198b3e6
1 changed files with 11 additions and 2 deletions

View File

@ -21,9 +21,15 @@ set_include_path(implode(PATH_SEPARATOR, array(
realpath(APPLICATION_PATH . '/../library')
)));
// Ensure vendor/ is on the include path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../library/propel/runtime/lib')
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
@ -58,6 +64,9 @@ set_include_path(APPLICATION_PATH . '/../tests/application/testdata' . PATH_SEPA
//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());
@ -68,7 +77,7 @@ require_once 'Zend/Application.php';
require_once 'Zend/Config.php';
require_once APPLICATION_PATH.'/configs/conf.php';
require_once 'propel/runtime/lib/Propel.php';
require_once 'propel/propel1/runtime/lib/Propel.php';
Propel::init("../application/configs/airtime-conf-production.php");
require_once 'Zend/Session.php';