-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b97250
commit 2eaf7b4
Showing
3 changed files
with
19 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,9 +21,6 @@ | |
* @author David Szkiba <[email protected]> | ||
* @copyright 2023 Georg Maißer <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
* @autor David Szkiba <[email protected]> | ||
* @copirignt 2023 Georg Maißer <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
|
||
namespace local_catquiz; | ||
|
@@ -47,10 +44,21 @@ final class cancel_expired_attempts_test extends basic_testcase { | |
/** | ||
* Test if the newton raphson multi stable function returns expected outputs. | ||
* | ||
* @dataProvider attempt_expiration_is_detected_correctly_provider | ||
* @param int $attemptcreated | ||
* @param ?int $quizmaxtime | ||
* @param int $defaultmaxtime | ||
* @param int $now | ||
* @param bool $expected | ||
* @return void | ||
* @dataProvider attempt_expiration_is_detected_correctly_provider | ||
*/ | ||
public function test_attempt_expiration_is_detected_correctly(int $attemptcreated, ?int $quizmaxtime, int $defaultmaxtime, int $now, bool $expected) { | ||
public function test_attempt_expiration_is_detected_correctly( | ||
int $attemptcreated, | ||
?int $quizmaxtime, | ||
int $defaultmaxtime, | ||
int $now, | ||
bool $expected | ||
): void { | ||
$task = new cancel_expired_attempts(); | ||
$shouldbecompleted = $task->exceeds_maxtime($attemptcreated, $quizmaxtime, $defaultmaxtime, $now); | ||
$this->assertEquals($expected, $shouldbecompleted); | ||
|