From e4cdce9ff2a972095e6a81ab0616ad504f63002e Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 19 Dec 2013 11:09:49 -0500 Subject: [PATCH] CC-5651: Unit Test the Scheduler * Improved bootstrapping, fixed a bunch of errors * Start a session, got Zend_Application working --- airtime_mvc/tests/application/bootstrap.php | 4 ++++ airtime_mvc/tests/application/models/ShowTest.php | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/airtime_mvc/tests/application/bootstrap.php b/airtime_mvc/tests/application/bootstrap.php index b5e40e141..568ac0ef2 100644 --- a/airtime_mvc/tests/application/bootstrap.php +++ b/airtime_mvc/tests/application/bootstrap.php @@ -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(); diff --git a/airtime_mvc/tests/application/models/ShowTest.php b/airtime_mvc/tests/application/models/ShowTest.php index 366c7b976..5e69e0a9f 100644 --- a/airtime_mvc/tests/application/models/ShowTest.php +++ b/airtime_mvc/tests/application/models/ShowTest.php @@ -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(); }