diff --git a/tests/behat/behat_mod_coursework.php b/tests/behat/behat_mod_coursework.php index 2ec55dd..1574968 100644 --- a/tests/behat/behat_mod_coursework.php +++ b/tests/behat/behat_mod_coursework.php @@ -1136,7 +1136,7 @@ public function there_is_an_extension_for_the_student_which_has_expired() { */ public function i_enter_an_extension_in_the_form(string $timeextension, string $reasoncode = '') { $newtime = strtotime('3:30pm', strtotime($timeextension)); - // Put into ISO08601 format. + // Put into ISO-8601 format. $newtimestring = date('Y-m-d\TH:i', $newtime); $script = "const e = document.querySelector('input#extension-extend-deadline');" . "e.value = '$newtimestring'; e.dispatchEvent(new Event('change'));"; @@ -1160,8 +1160,8 @@ public function i_enter_an_extension_in_the_form(string $timeextension, string $ */ public function i_should_see_the_extension_in_the_form(string $timeextension, string $reasoncode = '') { $newtime = strtotime('3:30pm', strtotime($timeextension)); - // Put into format 30-09-2024 15:47. - $newtimestring = date('d-m-Y H:i', $newtime); + // Put into ISO-8601 format. + $newtimestring = date('Y-m-d\TH:i', $newtime); $script = "document.querySelector('input#extension-extend-deadline').value"; $result = behat_base::evaluate_script_in_session($this->getSession(), $script); if ($result != $newtimestring) {