diff --git a/airtime_mvc/application/Bootstrap.php b/airtime_mvc/application/Bootstrap.php index 7b4813e19..bc41379a0 100644 --- a/airtime_mvc/application/Bootstrap.php +++ b/airtime_mvc/application/Bootstrap.php @@ -102,8 +102,6 @@ class Bootstrap extends Zend_Application_Bootstrap_Bootstrap protected function _initZFDebug() { if (APPLICATION_ENV == "development"){ - global $CC_DBC; - $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->registerNamespace('ZFDebug'); diff --git a/airtime_mvc/application/models/tests/SchedulerExportTests.php b/airtime_mvc/application/models/tests/SchedulerExportTests.php index 24a6813ba..79fbad1b7 100644 --- a/airtime_mvc/application/models/tests/SchedulerExportTests.php +++ b/airtime_mvc/application/models/tests/SchedulerExportTests.php @@ -4,11 +4,12 @@ require_once(dirname(__FILE__)."/../Schedule.php"); class SchedulerExportTests extends PHPUnit_TestCase { function setup() { - global $CC_CONFIG, $CC_DBC; + global $CC_CONFIG; + $con = Propel::getConnection(); // Clear the files table $sql = "DELETE FROM ".$CC_CONFIG["filesTable"]; - $CC_DBC->query($sql); + $con->exec($sql); // Add a file $values = array("filepath" => dirname(__FILE__)."/test10001.mp3"); @@ -20,7 +21,7 @@ class SchedulerExportTests extends PHPUnit_TestCase { // Clear the schedule table $sql = "DELETE FROM ".$CC_CONFIG["scheduleTable"]; - $CC_DBC->query($sql); + $con->exec($sql); // Create a playlist $playlist = new Application_Model_Playlist(); diff --git a/airtime_mvc/application/models/tests/SchedulerTests.php b/airtime_mvc/application/models/tests/SchedulerTests.php index a51fa6fef..40235e786 100644 --- a/airtime_mvc/application/models/tests/SchedulerTests.php +++ b/airtime_mvc/application/models/tests/SchedulerTests.php @@ -8,11 +8,10 @@ class SchedulerTests extends PHPUnit_TestCase { private $storedFile2; function setup() { - global $CC_CONFIG, $CC_DBC; + global $CC_CONFIG; // Clear the files table //$sql = "DELETE FROM ".$CC_CONFIG["filesTable"]; - //$CC_DBC->query($sql); // Add a file $values = array("filepath" => dirname(__FILE__)."/test10001.mp3"); @@ -24,7 +23,6 @@ class SchedulerTests extends PHPUnit_TestCase { // Clear the schedule table //$sql = "DELETE FROM ".$CC_CONFIG["scheduleTable"]; - //$CC_DBC->query($sql); } function testDateToId() { diff --git a/airtime_mvc/application/models/tests/populator.php b/airtime_mvc/application/models/tests/populator.php index bf3f5b27b..1ad1b2806 100644 --- a/airtime_mvc/application/models/tests/populator.php +++ b/airtime_mvc/application/models/tests/populator.php @@ -15,12 +15,13 @@ require_once __DIR__.'/../../../library/propel/runtime/lib/Propel.php'; Propel::init(__DIR__.'/../../configs/airtime-conf.php'); AirtimeInstall::DbConnect(true); +$con = Propel::getConnection(); $sql = "DELETE FROM cc_show"; -$CC_DBC->query($sql); +$con->exec($sql); $sql = "DELETE FROM cc_show_days"; -$CC_DBC->query($sql); +$con->exec($sql); $sql = "DELETE FROM cc_show_instances"; -$CC_DBC->query($sql); +$con->exec($sql); /* // Create a playlist @@ -88,10 +89,10 @@ echo "End date: ".$endDate->format("Y-m-d H:i")."\n"; while ($showTime < $endDate) { echo $showTime->format("Y-m-d H:i")." < " .$endDate->format("Y-m-d H:i")."\n"; if ($resolution == "minute") { - createTestShow($showNumber, $showTime, "0:01"); + createTestShow($showNumber, $showTime, "0:01"); $showTime->add(new DateInterval("PT1M")); } elseif ($resolution == "hour") { - createTestShow($showNumber, $showTime); + createTestShow($showNumber, $showTime); $showTime->add(new DateInterval("PT1H")); } $showNumber = $showNumber + 1;