| Línea 35... |
Línea 35... |
| 35 |
* @package core_question
|
35 |
* @package core_question
|
| 36 |
* @category test
|
36 |
* @category test
|
| 37 |
* @copyright 2009 The Open University
|
37 |
* @copyright 2009 The Open University
|
| 38 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
38 |
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
| 39 |
*/
|
39 |
*/
|
| 40 |
class questionattempt_test extends \advanced_testcase {
|
40 |
final class questionattempt_test extends \advanced_testcase {
|
| 41 |
/** @var question_definition a question that can be used in the tests. */
|
41 |
/** @var question_definition a question that can be used in the tests. */
|
| 42 |
private $question;
|
42 |
private $question;
|
| 43 |
/** @var int fake question_usage id used in some tests. */
|
43 |
/** @var int fake question_usage id used in some tests. */
|
| 44 |
private $usageid;
|
44 |
private $usageid;
|
| 45 |
/** @var question_attempt a question attempt that can be used in the tests. */
|
45 |
/** @var question_attempt a question attempt that can be used in the tests. */
|
| 46 |
private $qa;
|
46 |
private $qa;
|
| Línea 47... |
Línea 47... |
| 47 |
|
47 |
|
| - |
|
48 |
protected function setUp(): void {
|
| 48 |
protected function setUp(): void {
|
49 |
parent::setUp();
|
| 49 |
$this->question = \test_question_maker::make_question('description');
|
50 |
$this->question = \test_question_maker::make_question('description');
|
| 50 |
$this->question->defaultmark = 3;
|
51 |
$this->question->defaultmark = 3;
|
| 51 |
$this->usageid = 13;
|
52 |
$this->usageid = 13;
|
| 52 |
$this->qa = new question_attempt($this->question, $this->usageid);
|
53 |
$this->qa = new question_attempt($this->question, $this->usageid);
|