CC-5651: Unit Test the Scheduler
This commit is contained in:
parent
55665fb246
commit
a59453cde5
2 changed files with 128 additions and 0 deletions
|
@ -511,4 +511,35 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
|
|||
$ds
|
||||
);
|
||||
}
|
||||
|
||||
public function testEditRepeatingShowChangeNoEndOption()
|
||||
{
|
||||
TestHelper::loginUser();
|
||||
|
||||
/** Test changing the no end option on a weekly repeating show **/
|
||||
$data = ShowServiceData::getWeeklyRepeatNoEndNoRRData();
|
||||
$showService = new Application_Service_ShowService(null, $data);
|
||||
$showService->addUpdateShow($data);
|
||||
|
||||
$data["add_show_end_date"] = '2016-01-09';
|
||||
$data["add_show_no_end"] = 0;
|
||||
$data["add_show_id"] = 1;
|
||||
|
||||
$showService = new Application_Service_ShowService(null, $data, true);
|
||||
$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(
|
||||
$this->createXmlDataSet(dirname(__FILE__)."/datasets/test_editRepeatingShowChangeNoEndOption.xml"),
|
||||
$ds
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue