CC-5651: Unit Test the Scheduler

* Improved bootstrapping, fixed a bunch of errors
* Start a session, got Zend_Application working
This commit is contained in:
Albert Santoni 2013-12-19 11:09:49 -05:00 committed by drigato
parent 37a95519c1
commit e4cdce9ff2
2 changed files with 7 additions and 1 deletions

View File

@ -36,4 +36,8 @@ if (file_exists('/usr/share/php/libzend-framework-php')) {
require_once 'Zend/Application.php';
require_once 'Zend/Config.php';
require_once 'Zend/Session.php';
#require_once 'DatabaseTestCase.php';
//Start the Session TODO: Move to an _initSession() function in a class
Zend_Session::start();

View File

@ -7,7 +7,8 @@ class ShowTest extends Zend_Test_PHPUnit_DatabaseTestCase
public function setUp()
{
$this->bootstrap = array($this, 'appBootstrap');
//$this->bootstrap = array($this, 'appBootstrap');
$this->appBootstrap();
//TODO: Use AirtimeInstall.php to create the database and database tables
//AirtimeInstall::createDatabase(blah blah);
//AirtimeInstall::createDatabaseTables(blah blah);
@ -17,6 +18,7 @@ class ShowTest extends Zend_Test_PHPUnit_DatabaseTestCase
public function appBootstrap()
{
$this->application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH .'/configs/application.ini');
Zend_Session::start();
$this->application->bootstrap();
}