Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 60... Línea 60...
60
    }
60
    }
Línea 61... Línea 61...
61
 
61
 
62
    /**
62
    /**
63
     * Test execute API CALL with no instance
63
     * Test execute API CALL with no instance
64
     */
64
     */
65
    public function test_execute_wrong_instance() {
65
    public function test_execute_wrong_instance(): void {
66
        $this->resetAfterTest();
66
        $this->resetAfterTest();
Línea 67... Línea 67...
67
        $getrecordings = $this->get_recordings(1234);
67
        $getrecordings = $this->get_recordings(1234);
68
 
68
 
Línea 73... Línea 73...
73
    }
73
    }
Línea 74... Línea 74...
74
 
74
 
75
    /**
75
    /**
76
     * Test execute API CALL without login
76
     * Test execute API CALL without login
77
     */
77
     */
78
    public function test_execute_without_login() {
78
    public function test_execute_without_login(): void {
Línea 79... Línea 79...
79
        $this->resetAfterTest();
79
        $this->resetAfterTest();
80
 
80
 
81
        $course = $this->getDataGenerator()->create_course();
81
        $course = $this->getDataGenerator()->create_course();
Línea 87... Línea 87...
87
    }
87
    }
Línea 88... Línea 88...
88
 
88
 
89
    /**
89
    /**
90
     * Test execute API CALL with invalid login
90
     * Test execute API CALL with invalid login
91
     */
91
     */
92
    public function test_execute_with_invalid_login() {
92
    public function test_execute_with_invalid_login(): void {
Línea 93... Línea 93...
93
        $this->resetAfterTest();
93
        $this->resetAfterTest();
94
 
94
 
95
        $generator = $this->getDataGenerator();
95
        $generator = $this->getDataGenerator();
Línea 105... Línea 105...
105
    }
105
    }
Línea 106... Línea 106...
106
 
106
 
107
    /**
107
    /**
108
     * When login as a student
108
     * When login as a student
109
     */
109
     */
110
    public function test_execute_with_valid_login() {
110
    public function test_execute_with_valid_login(): void {
Línea 111... Línea 111...
111
        $this->resetAfterTest();
111
        $this->resetAfterTest();
112
 
112
 
113
        $generator = $this->getDataGenerator();
113
        $generator = $this->getDataGenerator();
Línea 128... Línea 128...
128
    }
128
    }
Línea 129... Línea 129...
129
 
129
 
130
    /**
130
    /**
131
     * Check if tools are present for teacher/moderator
131
     * Check if tools are present for teacher/moderator
132
     */
132
     */
133
    public function test_get_recordings_tools() {
133
    public function test_get_recordings_tools(): void {
134
        $this->resetAfterTest();
134
        $this->resetAfterTest();
135
        $dataset = [
135
        $dataset = [
136
            'type' => instance::TYPE_ALL,
136
            'type' => instance::TYPE_ALL,
137
            'groups' => null,
137
            'groups' => null,
Línea 180... Línea 180...
180
    }
180
    }
Línea 181... Línea 181...
181
 
181
 
182
    /**
182
    /**
183
     * Check preview is present and displayed
183
     * Check preview is present and displayed
184
     */
184
     */
185
    public function test_get_recordings_preview() {
185
    public function test_get_recordings_preview(): void {
186
        $this->resetAfterTest();
186
        $this->resetAfterTest();
187
        $dataset = [
187
        $dataset = [
188
            'type' => instance::TYPE_ALL,
188
            'type' => instance::TYPE_ALL,
189
            'additionalsettings' => [
189
            'additionalsettings' => [
Línea 211... Línea 211...
211
 
211
 
212
    /**
212
    /**
213
     * Check we can see all recording from a course in a room only instance
213
     * Check we can see all recording from a course in a room only instance
214
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
214
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
215
     */
215
     */
216
    public function test_get_recordings_room_only() {
216
    public function test_get_recordings_room_only(): void {
217
        $this->resetAfterTest();
217
        $this->resetAfterTest();
218
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
218
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
219
        $dataset = [
219
        $dataset = [
220
            'type' => instance::TYPE_ALL,
220
            'type' => instance::TYPE_ALL,
Línea 254... Línea 254...
254
 
254
 
255
    /**
255
    /**
256
     * Check if we can see the imported recording in a new instance
256
     * Check if we can see the imported recording in a new instance
257
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
257
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
258
     */
258
     */
259
    public function test_get_recordings_imported() {
259
    public function test_get_recordings_imported(): void {
260
        $this->resetAfterTest();
260
        $this->resetAfterTest();
261
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
261
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
262
        $dataset = [
262
        $dataset = [
263
            'type' => instance::TYPE_ALL,
263
            'type' => instance::TYPE_ALL,
Línea 317... Línea 317...
317
 
317
 
318
    /**
318
    /**
319
     * Check we can see only imported recordings in a recordings only instance when "Show only imported links" enabled.
319
     * Check we can see only imported recordings in a recordings only instance when "Show only imported links" enabled.
320
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
320
     * @covers \mod_bigbluebuttonbn\external\get_recordings::execute
321
     */
321
     */
322
    public function test_get_imported_recordings_only() {
322
    public function test_get_imported_recordings_only(): void {
323
        $this->resetAfterTest();
323
        $this->resetAfterTest();
324
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
324
        set_config('bigbluebuttonbn_importrecordings_enabled', 1);
325
        $dataset = [
325
        $dataset = [
326
            'type' => instance::TYPE_ALL,
326
            'type' => instance::TYPE_ALL,
Línea 377... Línea 377...
377
     * @param int $coursemode
377
     * @param int $coursemode
378
     *
378
     *
379
     * @covers   \mod_bigbluebuttonbn\external\get_recordings::execute
379
     * @covers   \mod_bigbluebuttonbn\external\get_recordings::execute
380
     * @dataProvider recording_group_test_data
380
     * @dataProvider recording_group_test_data
381
     */
381
     */
382
    public function test_get_recordings_groups($type, $groups, $users, $recordingsdata, $test, $coursemode) {
382
    public function test_get_recordings_groups($type, $groups, $users, $recordingsdata, $test, $coursemode): void {
383
        $this->resetAfterTest();
383
        $this->resetAfterTest();
384
        $dataset = compact('type', 'groups', 'users', 'recordingsdata', 'test', 'coursemode');
384
        $dataset = compact('type', 'groups', 'users', 'recordingsdata', 'test', 'coursemode');
385
        $activityid = $this->create_from_dataset($dataset);
385
        $activityid = $this->create_from_dataset($dataset);
386
        $instance = instance::get_from_instanceid($activityid);
386
        $instance = instance::get_from_instanceid($activityid);