CC-5651: Unit Test the Scheduler

* Unit test bootstrapping work.
* Added a README.txt for the unit testing environment
This commit is contained in:
Albert Santoni 2013-12-18 16:05:31 -05:00 committed by drigato
parent 0f107dbad3
commit ae6efc8fc8
2 changed files with 35 additions and 1 deletions

View File

@ -0,0 +1,15 @@
To get the Airtime unit tests running:
==========================
1) Install PHPUnit
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
sudo mv phpunit.phar /usr/local/bin/phpunit
2) Install the DbUnit extension
sudo pear channel-discover pear.phpunit.de
sudo pear channel-discover pear.symfony.com
sudo pear install --alldeps phpunit/DbUnit

View File

@ -15,5 +15,24 @@ set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
)));
// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
get_include_path(),
realpath(APPLICATION_PATH . '/../library')
)));
set_include_path(APPLICATION_PATH . '/common' . PATH_SEPARATOR . get_include_path());
//Propel classes.
set_include_path(APPLICATION_PATH . '/models' . PATH_SEPARATOR . get_include_path());
//Controller plugins.
set_include_path(APPLICATION_PATH . '/controllers/plugins' . 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());
}
require_once 'Zend/Application.php';
#require_once 'DatabaseTestCase.php';
#require_once 'DatabaseTestCase.php';