Línea 31... |
Línea 31... |
31 |
* Unit tests for mod/workshop/lib.php.
|
31 |
* Unit tests for mod/workshop/lib.php.
|
32 |
*
|
32 |
*
|
33 |
* @copyright 2017 Simey Lameze <simey@moodle.com>
|
33 |
* @copyright 2017 Simey Lameze <simey@moodle.com>
|
34 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
34 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
35 |
*/
|
35 |
*/
|
36 |
class lib_test extends \advanced_testcase {
|
36 |
final class lib_test extends \advanced_testcase {
|
Línea 37... |
Línea 37... |
37 |
|
37 |
|
38 |
/**
|
38 |
/**
|
39 |
* Test calendar event provide action open.
|
39 |
* Test calendar event provide action open.
|
40 |
*/
|
40 |
*/
|
Línea 535... |
Línea 535... |
535 |
/**
|
535 |
/**
|
536 |
* Provider for test_mod_workshop_core_calendar_get_valid_event_timestart_range.
|
536 |
* Provider for test_mod_workshop_core_calendar_get_valid_event_timestart_range.
|
537 |
*
|
537 |
*
|
538 |
* @return array of (submissionstart, submissionend, assessmentstart, assessmentend, eventtype, expectedmin, expectedmax)
|
538 |
* @return array of (submissionstart, submissionend, assessmentstart, assessmentend, eventtype, expectedmin, expectedmax)
|
539 |
*/
|
539 |
*/
|
540 |
public function mod_workshop_core_calendar_get_valid_event_timestart_range_due_no_limit_provider() {
|
540 |
public static function mod_workshop_core_calendar_get_valid_event_timestart_range_due_no_limit_provider(): array {
|
541 |
$submissionstart = time() + DAYSECS;
|
541 |
$submissionstart = time() + DAYSECS;
|
542 |
$submissionend = $submissionstart + DAYSECS;
|
542 |
$submissionend = $submissionstart + DAYSECS;
|
543 |
$assessmentstart = $submissionend + DAYSECS;
|
543 |
$assessmentstart = $submissionend + DAYSECS;
|
544 |
$assessmentend = $assessmentstart + DAYSECS;
|
544 |
$assessmentend = $assessmentstart + DAYSECS;
|
Línea 690... |
Línea 690... |
690 |
/**
|
690 |
/**
|
691 |
* Provider for test_mod_workshop_core_calendar_event_timestart_updated.
|
691 |
* Provider for test_mod_workshop_core_calendar_event_timestart_updated.
|
692 |
*
|
692 |
*
|
693 |
* @return array of (submissionstart, submissionend, assessmentstart, assessmentend, eventtype, fieldtoupdate, newtime)
|
693 |
* @return array of (submissionstart, submissionend, assessmentstart, assessmentend, eventtype, fieldtoupdate, newtime)
|
694 |
*/
|
694 |
*/
|
695 |
public function mod_workshop_core_calendar_event_timestart_updated_provider() {
|
695 |
public static function mod_workshop_core_calendar_event_timestart_updated_provider(): array {
|
696 |
$submissionstart = time() + DAYSECS;
|
696 |
$submissionstart = time() + DAYSECS;
|
697 |
$submissionend = $submissionstart + DAYSECS;
|
697 |
$submissionend = $submissionstart + DAYSECS;
|
698 |
$assessmentstart = $submissionend + DAYSECS;
|
698 |
$assessmentstart = $submissionend + DAYSECS;
|
699 |
$assessmentend = $assessmentstart + DAYSECS;
|
699 |
$assessmentend = $assessmentstart + DAYSECS;
|