Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 11
Línea 33... Línea 33...
33
class lib_test extends \advanced_testcase {
33
class lib_test extends \advanced_testcase {
Línea 34... Línea 34...
34
 
34
 
35
    /**
35
    /**
36
     * Test the comment validation callback.
36
     * Test the comment validation callback.
37
     */
37
     */
38
    public function test_qbank_comment_comment_validate() {
38
    public function test_qbank_comment_comment_validate(): void {
39
        $commentparams = new \stdClass();
39
        $commentparams = new \stdClass();
40
        $commentparams->commentarea = 'question';
40
        $commentparams->commentarea = 'question';
Línea 41... Línea 41...
41
        $commentparams->component = 'qbank_comment';
41
        $commentparams->component = 'qbank_comment';
Línea 51... Línea 51...
51
    }
51
    }
Línea 52... Línea 52...
52
 
52
 
53
    /**
53
    /**
54
     * Test the comment display callback.
54
     * Test the comment display callback.
55
     */
55
     */
56
    public function test_qbank_comment_comment_display() {
56
    public function test_qbank_comment_comment_display(): void {
57
        $comment = new \stdClass();
57
        $comment = new \stdClass();
58
        $comment->text = 'test';
58
        $comment->text = 'test';
Línea 59... Línea 59...
59
        $comments = [$comment];
59
        $comments = [$comment];
Línea 73... Línea 73...
73
    }
73
    }
Línea 74... Línea 74...
74
 
74
 
75
    /**
75
    /**
76
     * Test the comment preview callback.
76
     * Test the comment preview callback.
77
     */
77
     */
78
    public function test_qbank_comment_preview_display() {
78
    public function test_qbank_comment_preview_display(): void {
79
        $this->resetAfterTest();
79
        $this->resetAfterTest();
80
        global $PAGE;
80
        global $PAGE;
Línea 81... Línea 81...
81
        $PAGE->set_url('/');
81
        $PAGE->set_url('/');
Línea 100... Línea 100...
100
    }
100
    }
Línea 101... Línea 101...
101
 
101
 
102
    /**
102
    /**
103
     * Test the comment preview callback.
103
     * Test the comment preview callback.
104
     */
104
     */
105
    public function test_qbank_comment_output_fragment_question_comment() {
105
    public function test_qbank_comment_output_fragment_question_comment(): void {
106
        $this->resetAfterTest();
106
        $this->resetAfterTest();
107
        $this->setAdminUser();
107
        $this->setAdminUser();
108
        global $PAGE;
108
        global $PAGE;