Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 37... Línea 37...
37
 * @copyright  2015 Juan Leyva <juan@moodle.com>
37
 * @copyright  2015 Juan Leyva <juan@moodle.com>
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 lib_test extends \advanced_testcase {
40
class lib_test extends \advanced_testcase {
Línea 41... Línea 41...
41
 
41
 
42
    public function test_export_contents() {
42
    public function test_export_contents(): void {
Línea 43... Línea 43...
43
        global $DB, $USER;
43
        global $DB, $USER;
Línea 44... Línea 44...
44
 
44
 
Línea 67... Línea 67...
67
 
67
 
68
    /**
68
    /**
69
     * Test imscp_view
69
     * Test imscp_view
70
     * @return void
70
     * @return void
71
     */
71
     */
72
    public function test_imscp_view() {
72
    public function test_imscp_view(): void {
Línea 73... Línea 73...
73
        global $CFG;
73
        global $CFG;
74
 
74
 
Línea 105... Línea 105...
105
        $completion = new \completion_info($course);
105
        $completion = new \completion_info($course);
106
        $completiondata = $completion->get_data($cm);
106
        $completiondata = $completion->get_data($cm);
107
        $this->assertEquals(1, $completiondata->completionstate);
107
        $this->assertEquals(1, $completiondata->completionstate);
108
    }
108
    }
Línea 109... Línea 109...
109
 
109
 
110
    public function test_imscp_core_calendar_provide_event_action() {
110
    public function test_imscp_core_calendar_provide_event_action(): void {
111
        $this->resetAfterTest();
111
        $this->resetAfterTest();
Línea 112... Línea 112...
112
        $this->setAdminUser();
112
        $this->setAdminUser();
113
 
113
 
Línea 131... Línea 131...
131
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
131
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
132
        $this->assertEquals(1, $actionevent->get_item_count());
132
        $this->assertEquals(1, $actionevent->get_item_count());
133
        $this->assertTrue($actionevent->is_actionable());
133
        $this->assertTrue($actionevent->is_actionable());
134
    }
134
    }
Línea 135... Línea 135...
135
 
135
 
136
    public function test_imscp_core_calendar_provide_event_action_for_user() {
136
    public function test_imscp_core_calendar_provide_event_action_for_user(): void {
Línea 137... Línea 137...
137
        global $CFG;
137
        global $CFG;
138
 
138
 
Línea 168... Línea 168...
168
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
168
        $this->assertInstanceOf('moodle_url', $actionevent->get_url());
169
        $this->assertEquals(1, $actionevent->get_item_count());
169
        $this->assertEquals(1, $actionevent->get_item_count());
170
        $this->assertTrue($actionevent->is_actionable());
170
        $this->assertTrue($actionevent->is_actionable());
171
    }
171
    }
Línea 172... Línea 172...
172
 
172
 
173
    public function test_imscp_core_calendar_provide_event_action_as_non_user() {
173
    public function test_imscp_core_calendar_provide_event_action_as_non_user(): void {
Línea 174... Línea 174...
174
        global $CFG;
174
        global $CFG;
175
 
175
 
Línea 196... Línea 196...
196
 
196
 
197
        // Confirm the event is not shown at all.
197
        // Confirm the event is not shown at all.
198
        $this->assertNull($actionevent);
198
        $this->assertNull($actionevent);
Línea 199... Línea 199...
199
    }
199
    }
200
 
200
 
Línea 201... Línea 201...
201
    public function test_imscp_core_calendar_provide_event_action_in_hidden_section() {
201
    public function test_imscp_core_calendar_provide_event_action_in_hidden_section(): void {
202
        global $CFG;
202
        global $CFG;
Línea 232... Línea 232...
232
 
232
 
233
        // Confirm the event is not shown at all.
233
        // Confirm the event is not shown at all.
234
        $this->assertNull($actionevent);
234
        $this->assertNull($actionevent);
Línea 235... Línea 235...
235
    }
235
    }
236
 
236
 
Línea 237... Línea 237...
237
    public function test_imscp_core_calendar_provide_event_action_already_completed() {
237
    public function test_imscp_core_calendar_provide_event_action_already_completed(): void {
238
        global $CFG;
238
        global $CFG;
Línea 266... Línea 266...
266
 
266
 
267
        // Ensure result was null.
267
        // Ensure result was null.
268
        $this->assertNull($actionevent);
268
        $this->assertNull($actionevent);
Línea 269... Línea 269...
269
    }
269
    }
270
 
270
 
Línea 271... Línea 271...
271
    public function test_imscp_core_calendar_provide_event_action_already_completed_for_user() {
271
    public function test_imscp_core_calendar_provide_event_action_already_completed_for_user(): void {
272
        global $CFG;
272
        global $CFG;