Merge branch 'LibreTime:master' into master

This commit is contained in:
Zachary Klosko 2021-05-28 09:03:42 -04:00
commit 37de2e26b7
18 changed files with 456 additions and 177 deletions

View file

@ -772,7 +772,7 @@ class Application_Model_Preference
public static function GetImportTimestamp()
{
return self::getValue("import_timestamp");
return (int) self::getValue("import_timestamp");
}
public static function GetStreamType()

View file

@ -13,7 +13,7 @@ class PreferenceUnitTest extends PHPUnit_Framework_TestCase
public function testSetShowsPopulatedUntil()
{
$date = new DateTime();
$date = new DateTime("2040-01-01T12:00:00.000000Z");
Application_Model_Preference::SetShowsPopulatedUntil($date);
$this->assertEquals(Application_Model_Preference::GetShowsPopulatedUntil(), $date);
}

View file

@ -463,29 +463,6 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
}
/** Test the creation of a weekly repeating, record and rebroadcast(RR) show **/
public function testCreateWeeklyRepeatRRShow()
{
TestHelper::loginUser();
$data = ShowServiceData::getWeeklyRepeatRRData();
$showService = new Application_Service_ShowService(null, $data);
$showService->addUpdateShow($data);
$ds = new Zend_Test_PHPUnit_Db_DataSet_QueryDataSet(
$this->getConnection()
);
$ds->addTable('cc_show', 'select * from cc_show');
$ds->addTable('cc_show_days', 'select * from cc_show_days');
$ds->addTable('cc_show_instances', 'select id, starts, ends, show_id, record, rebroadcast, instance_id, modified_instance from cc_show_instances');
$ds->addTable('cc_show_rebroadcast', 'select * from cc_show_rebroadcast');
$ds->addTable('cc_show_hosts', 'select * from cc_show_hosts');
$this->assertDataSetsEqual(
new PHPUnit_Extensions_Database_DataSet_YamlDataSet(__DIR__ . "/datasets/test_createWeeklyRepeatRRShow.yml"),
$ds
);
}
public function testEditRepeatingShowChangeNoEndOption()
{
TestHelper::loginUser();