CC-5651: Unit Test the Scheduler

* Continued refactoring of the database creation.
* Database now persists after running tests but most of the tables are
  cleared.
* The unit tests run WAY faster now. :-)
This commit is contained in:
Albert Santoni 2014-01-23 17:04:29 -05:00
parent aa2e084a09
commit 162a873f9d
8 changed files with 109 additions and 18 deletions

View file

@ -22,23 +22,13 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
public function setUp()
{
TestHelper::installTestDatabase();
//XXX: Zend_Test_PHPUnit_DatabaseTestCase doesn't use this for whatever reason:
//$this->bootstrap = array($this, 'appBootstrap');
//So instead we just manually call the appBootstrap here:
$this->appBootstrap();
TestHelper::setupZendBootstrap();
//$this->_nowDT = new DateTime("now", new DateTimeZone("UTC"));
parent::setUp();
}
public function appBootstrap()
{
$this->application = new Zend_Application(APPLICATION_ENV, APPLICATION_PATH .'/configs/application.ini');
$this->application->bootstrap();
}
public function getConnection()
{
if ($this->_connectionMock == null) {