diff options
author | sten <stenmarsh938@gmail.com> | 2016-03-21 12:50:04 +0300 |
---|---|---|
committer | sten <stenmarsh938@gmail.com> | 2016-03-21 12:50:04 +0300 |
commit | 3ec15ffe2273acf2820df11203dc4ab06614d15b (patch) | |
tree | 8b97a00e3583795bc55dfdab21860db61464ba81 | |
parent | e93b6c9f82c9a8136f8c9d64357f1500bef0917f (diff) | |
download | scheduler-helper-php-3ec15ffe2273acf2820df11203dc4ab06614d15b.zip scheduler-helper-php-3ec15ffe2273acf2820df11203dc4ab06614d15b.tar.gz scheduler-helper-php-3ec15ffe2273acf2820df11203dc4ab06614d15b.tar.bz2 |
Add data for saveData test.
6 files changed, 268 insertions, 11 deletions
diff --git a/tests/Data_saveDataUpdate/MonthRecurrings/source.json b/tests/Data_saveDataUpdate/MonthRecurrings/source.json new file mode 100644 index 0000000..17fafba --- /dev/null +++ b/tests/Data_saveDataUpdate/MonthRecurrings/source.json @@ -0,0 +1,86 @@ +{ + "insert_data": [ + { + "id": "1", + "start_date": "2015-02-04 11:00:00", + "end_date": "2015-02-04 19:30:00", + "text": "Event X1", + "rec_type": "", + "event_length": "" + }, + { + "id": "2", + "start_date": "2020-07-09 11:00:00", + "end_date": "2020-07-09 19:20:00", + "text": "Event X2", + "rec_type": "day_1___#3", + "event_length": "600" + }, + { + "id": "3", + "start_date": "2014-04-09 18:00:00", + "end_date": "2014-04-09 19:25:00", + "text": "Event X3", + "rec_type": "", + "event_length": "" + }, + { + "id": "4", + "start_date": "2014-04-20 18:00:00", + "end_date": "2014-05-30 19:25:00", + "text": "Event X4", + "rec_type": "", + "event_length": "" + } + ], + "data": [ + { + "id": 1, + "recurring_type": { + "each": "month", + "step": 3 + }, + "start_date": "2016-03-13 12:00:00", + "end_date": "9999-02-01 00:00:00", + "length": 2100, + "text": "Test Month 1" + }, + { + "id": 2, + "recurring_type": { + "each": "month", + "repeat": 6, + "week_number": 4, + "days_of_week": "friday", + "step": 1 + }, + "start_date": "2016-03-01 15:00:00", + "length": 17700, + "text": "Test Month 2" + }, + { + "id": 3, + "recurring_type": { + "each": "month", + "step": 1, + "days_of_week": "wednesday", + "week_number": 1 + }, + "start_date": "2016-03-01 10:00:00", + "end_date": "2016-08-21 00:00:00", + "length": 26100, + "text": "Test Month 3" + }, + { + "id": 4, + "recurring_type": { + "each": "month", + "step": 1 + }, + "start_date": "2016-03-30 02:50:00", + "end_date": "9999-02-01 00:00:00", + "length": 18000, + "text": "Test Month 4" + } + ] +}
\ No newline at end of file diff --git a/tests/Data_saveDataUpdate/MonthRecurrings/target.json b/tests/Data_saveDataUpdate/MonthRecurrings/target.json new file mode 100644 index 0000000..704a01e --- /dev/null +++ b/tests/Data_saveDataUpdate/MonthRecurrings/target.json @@ -0,0 +1,40 @@ +{ + "data": [ + { + "start_date": "2016-03-13 12:00:00", + "end_date": "9999-02-01 00:00:00", + "text": "Test Month 1", + "id": "1", + "event_pid": "", + "event_length": "2100", + "rec_type": "month_3___#no" + }, + { + "start_date": "2016-03-01 15:00:00", + "end_date": "2016-09-23 15:00:00", + "text": "Test Month 2", + "id": "2", + "event_pid": "", + "event_length": "17700", + "rec_type": "month_1_5_4_#6" + }, + { + "start_date": "2016-03-01 10:00:00", + "end_date": "2016-08-21 00:00:00", + "text": "Test Month 3", + "id": "3", + "event_pid": "", + "event_length": "26100", + "rec_type": "month_1_3_1_#" + }, + { + "start_date": "2016-03-30 02:50:00", + "end_date": "9999-02-01 00:00:00", + "text": "Test Month 4", + "id": "4", + "event_pid": "", + "event_length": "18000", + "rec_type": "month_1___#no" + } + ] +}
\ No newline at end of file diff --git a/tests/Data_saveDataUpdate/WeekRecurrings/source.json b/tests/Data_saveDataUpdate/WeekRecurrings/source.json index b66c9c6..dbce0bb 100644 --- a/tests/Data_saveDataUpdate/WeekRecurrings/source.json +++ b/tests/Data_saveDataUpdate/WeekRecurrings/source.json @@ -34,7 +34,8 @@ "days_of_week": "sunday,monday,tuesday,wednesday,thursday,friday,saturday" }, "start_date": "2016-03-01 12:20:00", - "length": 11400, + "end_date": "9999-02-01 00:00:00", + "length": 300, "text": "Test Week Event 1" }, { @@ -42,11 +43,13 @@ "recurring_type": { "each": "week", "repeat": 17, - "days_of_week": "monday,wednesday,friday" + "step": 1, + "days_of_week": "monday,wednesday,thursday,friday" }, "start_date": "2016-03-02 20:00:00", - "length": 11400, + "end_date": "2016-03-31 00:00:00", + "length": 300, "text": "Test Week Event 2" }, { @@ -58,7 +61,7 @@ }, "start_date": "2016-03-02 15:55:00", "end_date": "2016-08-21 00:00:00", - "length": 6000, + "length": 600, "text": "Test Week Event 3" } ] diff --git a/tests/Data_saveDataUpdate/WeekRecurrings/target.json b/tests/Data_saveDataUpdate/WeekRecurrings/target.json index fca6190..731db63 100644 --- a/tests/Data_saveDataUpdate/WeekRecurrings/target.json +++ b/tests/Data_saveDataUpdate/WeekRecurrings/target.json @@ -1,32 +1,32 @@ { "data": [ { - "start_date": "2016-03-01 00:00:00", + "start_date": "2016-03-01 12:20:00", "end_date": "9999-02-01 00:00:00", "text": "Test Week Event 1", - "id": "4", + "id": "1", "event_pid": "", "event_length": "300", "rec_pattern": "week_2___0,1,2,3,4,5,6", "rec_type": "week_2___0,1,2,3,4,5,6#no" }, { - "start_date": "2016-03-02 00:00:00", + "start_date": "2016-03-02 20:00:00", "end_date": "2016-03-31 00:00:00", "text": "Test Week Event 2", - "id": "5", + "id": "2", "event_pid": "", "event_length": "300", "rec_pattern": "week_1___1,3,4,5", "rec_type": "week_1___1,3,4,5#17" }, { - "start_date": "2016-03-02 00:00:00", + "start_date": "2016-03-02 15:55:00", "end_date": "2016-08-21 00:00:00", "text": "Test Week Event 3", - "id": "6", + "id": "3", "event_pid": "", - "event_length": "300", + "event_length": "600", "rec_pattern": "week_3___1,3", "rec_type": "week_3___1,3#" } diff --git a/tests/Data_saveDataUpdate/YearRecurrings/source.json b/tests/Data_saveDataUpdate/YearRecurrings/source.json new file mode 100644 index 0000000..351e8b6 --- /dev/null +++ b/tests/Data_saveDataUpdate/YearRecurrings/source.json @@ -0,0 +1,88 @@ +{ + "insert_data": [ + { + "id": "1", + "start_date": "2015-02-04 11:00:00", + "end_date": "2015-02-04 19:30:00", + "text": "Event X1", + "rec_type": "", + "event_length": "" + }, + { + "id": "2", + "start_date": "2020-07-09 11:00:00", + "end_date": "2020-07-09 19:20:00", + "text": "Event X2", + "rec_type": "day_1___#3", + "event_length": "600" + }, + { + "id": "3", + "start_date": "2014-04-09 18:00:00", + "end_date": "2014-04-09 19:25:00", + "text": "Event X3", + "rec_type": "", + "event_length": "" + }, + { + "id": "4", + "start_date": "2014-04-20 18:00:00", + "end_date": "2014-05-30 19:25:00", + "text": "Event X4", + "rec_type": "", + "event_length": "" + } + ], + "data": [ + { + "id": 1, + "recurring_type": { + "each": "year", + "step": 1 + }, + "start_date": "2016-03-08 11:40:00", + "end_date": "9999-02-01 00:00:00", + "length": 6600, + "text": "Test Year 1" + }, + { + "id": 2, + "recurring_type": { + "each": "year", + "repeat": 4, + "week_number": 1, + "step": 1, + "days_of_week": "monday" + }, + "start_date": "2016-03-01 10:35:00", + "length": 30000, + "text": "Test Year 2" + }, + { + "id": 3, + "recurring_type": { + "each": "year", + "step": 1, + "days_of_week": "sunday", + "week_number": 4 + }, + "start_date": "2016-12-01 22:00:00", + "end_date": "2019-04-21 00:00:00", + "length": 3900, + "text": "Test Year 3" + }, + { + "id": 4, + "recurring_type": { + "each": "year", + "step": 1, + "days_of_week": "tuesday", + "week_number": 1 + }, + "start_date": "2016-01-01 10:40:00", + "end_date": "9999-02-01 00:00:00", + "length": 47700, + "text": "Test Year 4" + } + ] +}
\ No newline at end of file diff --git a/tests/Data_saveDataUpdate/YearRecurrings/target.json b/tests/Data_saveDataUpdate/YearRecurrings/target.json new file mode 100644 index 0000000..5b47acb --- /dev/null +++ b/tests/Data_saveDataUpdate/YearRecurrings/target.json @@ -0,0 +1,40 @@ +{ + "data": [ + { + "start_date": "2016-03-08 11:40:00", + "end_date": "9999-02-01 00:00:00", + "text": "Test Year 1", + "id": "1", + "event_pid": "", + "event_length": "6600", + "rec_type": "year_1___#no" + }, + { + "start_date": "2016-03-01 10:35:00", + "end_date": "2020-03-02 10:35:00", + "text": "Test Year 2", + "id": "2", + "event_pid": "", + "event_length": "30000", + "rec_type": "year_1_1_1_#4" + }, + { + "start_date": "2016-12-01 22:00:00", + "end_date": "2019-04-21 00:00:00", + "text": "Test Year 3", + "id": "3", + "event_pid": "", + "event_length": "3900", + "rec_type": "year_1_7_4_#" + }, + { + "start_date": "2016-01-01 10:40:00", + "end_date": "9999-02-01 00:00:00", + "text": "Test Year 4", + "id": "4", + "event_pid": "", + "event_length": "47700", + "rec_type": "year_1_2_1_#no" + } + ] +}
\ No newline at end of file |