Fixed testcases to account for show image path in and show instance description
This commit is contained in:
parent
6ade74163d
commit
0196aa21f5
28 changed files with 125 additions and 76 deletions
|
@ -84,6 +84,21 @@ class TestHelper
|
|||
//Now that cc_files is empty, clearing cc_music_dirs should work
|
||||
$sql = "DELETE FROM cc_music_dirs";
|
||||
AirtimeInstall::InstallQuery($sql, false);
|
||||
|
||||
// Because files are stored relative to their watch directory,
|
||||
// we need to set the "stor" path before we can successfully
|
||||
// create a fake file in the database.
|
||||
//Copy paste from airtime-db-install.php:
|
||||
$stor_dir = "/tmp";
|
||||
$con = Propel::getConnection();
|
||||
$sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$stor_dir', 'stor')";
|
||||
try {
|
||||
$con->exec($sql);
|
||||
} catch (Exception $e) {
|
||||
echo " * Failed inserting {$stor_dir} in cc_music_dirs".PHP_EOL;
|
||||
echo " * Message {$e->getMessage()}".PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
$con->commit();
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -48,22 +48,9 @@ class ScheduleUnitTest extends Zend_Test_PHPUnit_ControllerTestCase //PHPUnit_Fr
|
|||
//$showService->setCcShow($testShowData); //Denise says this is not needed.
|
||||
$showService->addUpdateShow($testShowData); //Create show instances
|
||||
|
||||
// Because files are stored relative to their watch directory,
|
||||
// we need to set the "stor" path before we can successfully
|
||||
// create a fake file in the database.
|
||||
//Copy paste from airtime-db-install.php:
|
||||
$stor_dir = "/tmp";
|
||||
$con = Propel::getConnection();
|
||||
$sql = "INSERT INTO cc_music_dirs (directory, type) VALUES ('$stor_dir', 'stor')";
|
||||
try {
|
||||
$con->exec($sql);
|
||||
} catch (Exception $e) {
|
||||
echo " * Failed inserting {$stor_dir} in cc_music_dirs".PHP_EOL;
|
||||
echo " * Message {$e->getMessage()}".PHP_EOL;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Insert a fake file into the database
|
||||
// Moved creation of stor directory to TestHelper for setup
|
||||
|
||||
// Insert a fake file into the database
|
||||
$request = $this->getRequest();
|
||||
$params = $request->getParams();
|
||||
$params['action'] = '';
|
||||
|
|
|
@ -285,6 +285,7 @@ class ShowServiceDbTest extends Zend_Test_PHPUnit_DatabaseTestCase
|
|||
$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 order by id');
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
</dataset>
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value>1</value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,6 +29,7 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value></value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
<column>live_stream_pass</column>
|
||||
<column>linked</column>
|
||||
<column>is_linkable</column>
|
||||
<column>image_path</column>
|
||||
<row>
|
||||
<value>1</value>
|
||||
<value>test show</value>
|
||||
|
@ -28,8 +29,9 @@
|
|||
<null />
|
||||
<value></value>
|
||||
<value>1</value>
|
||||
<value></value>
|
||||
</row>
|
||||
</table>
|
||||
</table>
|
||||
|
||||
<table name="cc_show_days">
|
||||
<column>id</column>
|
||||
|
|
|
@ -243,6 +243,7 @@ Class ShowServiceData
|
|||
"add_show_id" => 1,
|
||||
"add_show_instance_id" => 2,
|
||||
"add_show_name" => "test show",
|
||||
"add_show_instance_description" => "",
|
||||
"add_show_url" => null,
|
||||
"add_show_genre" => null,
|
||||
"add_show_description" => null,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue