Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 49... Línea 49...
49
 
49
 
50
    /**
50
    /**
51
     * Test lti_view
51
     * Test lti_view
52
     * @return void
52
     * @return void
53
     */
53
     */
54
    public function test_lti_view() {
54
    public function test_lti_view(): void {
Línea 55... Línea 55...
55
        global $CFG;
55
        global $CFG;
56
 
56
 
Línea 91... Línea 91...
91
    }
91
    }
Línea 92... Línea 92...
92
 
92
 
93
    /**
93
    /**
94
     * Test deleting LTI instance.
94
     * Test deleting LTI instance.
95
     */
95
     */
96
    public function test_lti_delete_instance() {
96
    public function test_lti_delete_instance(): void {
Línea 97... Línea 97...
97
        $this->resetAfterTest();
97
        $this->resetAfterTest();
98
 
98
 
99
        $this->setAdminUser();
99
        $this->setAdminUser();
Línea 103... Línea 103...
103
 
103
 
104
        // Must not throw notices.
104
        // Must not throw notices.
105
        course_delete_module($cm->id);
105
        course_delete_module($cm->id);
Línea 106... Línea 106...
106
    }
106
    }
107
 
107
 
108
    public function test_lti_core_calendar_provide_event_action() {
108
    public function test_lti_core_calendar_provide_event_action(): void {
Línea 109... Línea 109...
109
        $this->resetAfterTest();
109
        $this->resetAfterTest();
110
        $this->setAdminUser();
110
        $this->setAdminUser();
Línea 129... Línea 129...
129
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
129
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
130
        $this->assertEquals(1, $actionevent->get_item_count());
130
        $this->assertEquals(1, $actionevent->get_item_count());
131
        $this->assertTrue($actionevent->is_actionable());
131
        $this->assertTrue($actionevent->is_actionable());
132
    }
132
    }
Línea 133... Línea 133...
133
 
133
 
134
    public function test_lti_core_calendar_provide_event_action_as_non_user() {
134
    public function test_lti_core_calendar_provide_event_action_as_non_user(): void {
Línea 135... Línea 135...
135
        global $CFG;
135
        global $CFG;
136
 
136
 
Línea 157... Línea 157...
157
 
157
 
158
        // Confirm the event is not shown at all.
158
        // Confirm the event is not shown at all.
159
        $this->assertNull($actionevent);
159
        $this->assertNull($actionevent);
Línea 160... Línea 160...
160
    }
160
    }
161
 
161
 
Línea 162... Línea 162...
162
    public function test_lti_core_calendar_provide_event_action_for_user() {
162
    public function test_lti_core_calendar_provide_event_action_for_user(): void {
163
        global $CFG;
163
        global $CFG;
Línea 192... Línea 192...
192
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
192
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
193
        $this->assertEquals(1, $actionevent->get_item_count());
193
        $this->assertEquals(1, $actionevent->get_item_count());
194
        $this->assertTrue($actionevent->is_actionable());
194
        $this->assertTrue($actionevent->is_actionable());
195
    }
195
    }
Línea 196... Línea 196...
196
 
196
 
197
    public function test_lti_core_calendar_provide_event_action_already_completed() {
197
    public function test_lti_core_calendar_provide_event_action_already_completed(): void {
Línea 198... Línea 198...
198
        global $CFG;
198
        global $CFG;
199
 
199
 
Línea 226... Línea 226...
226
 
226
 
227
        // Ensure result was null.
227
        // Ensure result was null.
228
        $this->assertNull($actionevent);
228
        $this->assertNull($actionevent);
Línea 229... Línea 229...
229
    }
229
    }
230
 
230
 
Línea 231... Línea 231...
231
    public function test_lti_core_calendar_provide_event_action_already_completed_as_non_user() {
231
    public function test_lti_core_calendar_provide_event_action_already_completed_as_non_user(): void {
232
        global $CFG;
232
        global $CFG;
Línea 264... Línea 264...
264
 
264
 
265
        // Ensure result was null.
265
        // Ensure result was null.
266
        $this->assertNull($actionevent);
266
        $this->assertNull($actionevent);
Línea 267... Línea 267...
267
    }
267
    }
268
 
268
 
Línea 269... Línea 269...
269
    public function test_lti_core_calendar_provide_event_action_already_completed_for_user() {
269
    public function test_lti_core_calendar_provide_event_action_already_completed_for_user(): void {
270
        global $CFG;
270
        global $CFG;
Línea 329... Línea 329...
329
    }
329
    }
Línea 330... Línea 330...
330
 
330
 
331
    /**
331
    /**
332
     * Test verifying the output of the lti_get_course_content_items and lti_get_all_content_items callbacks.
332
     * Test verifying the output of the lti_get_course_content_items and lti_get_all_content_items callbacks.
333
     */
333
     */
334
    public function test_content_item_callbacks() {
334
    public function test_content_item_callbacks(): void {
335
        $this->resetAfterTest();
335
        $this->resetAfterTest();
336
        global $DB, $CFG;
336
        global $DB, $CFG;
Línea 337... Línea 337...
337
        require_once($CFG->dirroot . '/mod/lti/locallib.php');
337
        require_once($CFG->dirroot . '/mod/lti/locallib.php');