Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 50... Línea 50...
50
 
50
 
51
    /**
51
    /**
52
     * Test resource_view
52
     * Test resource_view
53
     * @return void
53
     * @return void
54
     */
54
     */
55
    public function test_resource_view() {
55
    public function test_resource_view(): void {
Línea 56... Línea 56...
56
        global $CFG;
56
        global $CFG;
57
 
57
 
Línea 94... Línea 94...
94
    /**
94
    /**
95
     * Tests the resource_get_coursemodule_info function.
95
     * Tests the resource_get_coursemodule_info function.
96
     *
96
     *
97
     * Note: This currently doesn't test every aspect of the function, mainly focusing on the icon.
97
     * Note: This currently doesn't test every aspect of the function, mainly focusing on the icon.
98
     */
98
     */
99
    public function test_get_coursemodule_info() {
99
    public function test_get_coursemodule_info(): void {
100
        global $DB, $USER;
100
        global $DB, $USER;
Línea 101... Línea 101...
101
 
101
 
102
        $this->resetAfterTest();
102
        $this->resetAfterTest();
Línea 151... Línea 151...
151
                $DB->get_record('course_modules', array('id' => $resource3->cmid)));
151
                $DB->get_record('course_modules', array('id' => $resource3->cmid)));
152
        $this->assertEquals('R3', $info->name);
152
        $this->assertEquals('R3', $info->name);
153
        $this->assertEquals('f/document', $info->icon);
153
        $this->assertEquals('f/document', $info->icon);
154
    }
154
    }
Línea 155... Línea 155...
155
 
155
 
156
    public function test_resource_core_calendar_provide_event_action() {
156
    public function test_resource_core_calendar_provide_event_action(): void {
157
        $this->resetAfterTest();
157
        $this->resetAfterTest();
Línea 158... Línea 158...
158
        $this->setAdminUser();
158
        $this->setAdminUser();
159
 
159
 
Línea 177... Línea 177...
177
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
177
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
178
        $this->assertEquals(1, $actionevent->get_item_count());
178
        $this->assertEquals(1, $actionevent->get_item_count());
179
        $this->assertTrue($actionevent->is_actionable());
179
        $this->assertTrue($actionevent->is_actionable());
180
    }
180
    }
Línea 181... Línea 181...
181
 
181
 
182
    public function test_resource_core_calendar_provide_event_action_already_completed() {
182
    public function test_resource_core_calendar_provide_event_action_already_completed(): void {
Línea 183... Línea 183...
183
        global $CFG;
183
        global $CFG;
184
 
184
 
Línea 214... Línea 214...
214
    }
214
    }
Línea 215... Línea 215...
215
 
215
 
216
    /**
216
    /**
217
     * Test mod_resource_core_calendar_provide_event_action with user override
217
     * Test mod_resource_core_calendar_provide_event_action with user override
218
     */
218
     */
219
    public function test_resource_core_calendar_provide_event_action_user_override() {
219
    public function test_resource_core_calendar_provide_event_action_user_override(): void {
Línea 220... Línea 220...
220
        global $CFG, $USER;
220
        global $CFG, $USER;
221
 
221
 
222
        $this->resetAfterTest();
222
        $this->resetAfterTest();