CC-2833: Use ClassLoaders for PHP Files

-made MusicDir, Playlist and StoredFile autoload
This commit is contained in:
martin 2011-09-22 12:24:17 -04:00
parent 4e79a88adc
commit 2be0960ed5
22 changed files with 124 additions and 551 deletions

View file

@ -16,11 +16,11 @@ class SchedulerTests extends PHPUnit_TestCase {
// Add a file
$values = array("filepath" => dirname(__FILE__)."/test10001.mp3");
$this->storedFile = StoredFile::Insert($values, false);
$this->storedFile = Application_Model_StoredFile::Insert($values, false);
// Add a file
$values = array("filepath" => dirname(__FILE__)."/test10002.mp3");
$this->storedFile2 = StoredFile::Insert($values, false);
$this->storedFile2 = Application_Model_StoredFile::Insert($values, false);
// Clear the schedule table
//$sql = "DELETE FROM ".$CC_CONFIG["scheduleTable"];
@ -59,7 +59,7 @@ class SchedulerTests extends PHPUnit_TestCase {
function testAddAndRemovePlaylist() {
// Create a playlist
$playlist = new Playlist();
$playlist = new Application_Model_Playlist();
$playlist->create("Scheduler Unit Test ".uniqid());
$result = $playlist->addAudioClip($this->storedFile->getId());
$result = $playlist->addAudioClip($this->storedFile2->getId());
@ -84,7 +84,7 @@ class SchedulerTests extends PHPUnit_TestCase {
$this->fail("Did not remove item.");
}
Playlist::Delete($playlist->getId());
Application_Model_Playlist::Delete($playlist->getId());
}
function testIsScheduleEmptyInRange() {