Skip to content

Commit

Permalink
refactor: use constants for question and task states (instead of stri…
Browse files Browse the repository at this point in the history
…ngs everywhere)
  • Loading branch information
Glutamat42 committed Jan 30, 2024
1 parent 51617ba commit 532db66
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/external/answer_questions_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace mod_adleradaptivity\external;

use mod_adleradaptivity\lib\adler_externallib_testcase;
use mod_adleradaptivity\local\completion_helpers;
use moodle_exception;

global $CFG;
Expand Down Expand Up @@ -125,17 +126,17 @@ public function provide_test_execute_integration__check_question_answered_correc
'successful 1' => [
'attempt1' => 'correct',
'attempt2' => 'incorrect',
'expected_result' => api_constants::STATUS_CORRECT,
'expected_result' => completion_helpers::STATUS_CORRECT,
],
'successful 2' => [
'attempt1' => 'correct',
'attempt2' => 'none',
'expected_result' => api_constants::STATUS_CORRECT,
'expected_result' => completion_helpers::STATUS_CORRECT,
],
'incorrect' => [
'attempt1' => 'incorrect',
'attempt2' => 'none',
'expected_result' => api_constants::STATUS_INCORRECT,
'expected_result' => completion_helpers::STATUS_INCORRECT,
],
];
}
Expand Down

0 comments on commit 532db66

Please sign in to comment.