CC-5651: Unit Test the Scheduler

* Got the database connection working in our unit test
This commit is contained in:
Albert Santoni 2013-12-18 17:40:13 -05:00 committed by drigato
parent 42aebe50af
commit 6026ec58db
2 changed files with 12 additions and 3 deletions

View File

@ -35,4 +35,5 @@ if (file_exists('/usr/share/php/libzend-framework-php')) {
}
require_once 'Zend/Application.php';
require_once 'Zend/Config.php';
#require_once 'DatabaseTestCase.php';

View File

@ -20,8 +20,16 @@ class ShowTest extends Zend_Test_PHPUnit_DatabaseTestCase
public function getConnection()
{
if ($this->_connectionMock == null) {
$config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/application.ini', 'production');
$connection = Zend_Db::factory($config->db);
$config = new Zend_Config(
array(
'host' => '127.0.0.1',
'dbname' => 'airtime_test',
'username' => 'airtime',
'password' => 'airtime'
)
);
var_dump($config);
$connection = Zend_Db::factory('pdo_pgsql', $config);
$this->_connectionMock = $this->createZendDbConnection(
$connection,
@ -73,4 +81,4 @@ class ShowTest extends Zend_Test_PHPUnit_DatabaseTestCase
$ds
);
}
}
}