Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
class reset_test extends \advanced_testcase {
41
class reset_test extends \advanced_testcase {
42
    use testcase_helper_trait;
42
    use testcase_helper_trait;
43
    /**
43
    /**
44
     * Reset course item test
44
     * Reset course item test
45
     */
45
     */
46
    public function test_reset_course_items() {
46
    public function test_reset_course_items(): void {
47
        global $CFG;
47
        global $CFG;
48
        $this->resetAfterTest();
48
        $this->resetAfterTest();
49
        $CFG->bigbluebuttonbn_recordings_enabled = false;
49
        $CFG->bigbluebuttonbn_recordings_enabled = false;
50
        $results = reset::reset_course_items();
50
        $results = reset::reset_course_items();
51
        $this->assertEquals(["events" => 0, "tags" => 0, "logs" => 0], $results);
51
        $this->assertEquals(["events" => 0, "tags" => 0, "logs" => 0], $results);
Línea 55... Línea 55...
55
    }
55
    }
Línea 56... Línea 56...
56
 
56
 
57
    /**
57
    /**
58
     * Reset get_status test
58
     * Reset get_status test
59
     */
59
     */
60
    public function test_reset_getstatus() {
60
    public function test_reset_getstatus(): void {
61
        $this->resetAfterTest();
61
        $this->resetAfterTest();
62
        $result = reset::reset_getstatus('events');
62
        $result = reset::reset_getstatus('events');
63
        $this->assertEquals([
63
        $this->assertEquals([
64
                'component' => 'BigBlueButton',
64
                'component' => 'BigBlueButton',
Línea 68... Línea 68...
68
    }
68
    }
Línea 69... Línea 69...
69
 
69
 
70
    /**
70
    /**
71
     * Reset event test
71
     * Reset event test
72
     */
72
     */
73
    public function test_reset_events() {
73
    public function test_reset_events(): void {
74
        global $DB;
74
        global $DB;
75
        $this->resetAfterTest();
75
        $this->resetAfterTest();
76
        $this->setAdminUser();
76
        $this->setAdminUser();
77
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
77
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(
Línea 90... Línea 90...
90
    }
90
    }
Línea 91... Línea 91...
91
 
91
 
92
    /**
92
    /**
93
     * Reset tags test
93
     * Reset tags test
94
     */
94
     */
95
    public function test_reset_tags() {
95
    public function test_reset_tags(): void {
96
        $this->resetAfterTest();
96
        $this->resetAfterTest();
97
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(null,
97
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(null,
98
                ['course' => $this->get_course()->id],
98
                ['course' => $this->get_course()->id],
99
                ['visible' => true]
99
                ['visible' => true]
Línea 107... Línea 107...
107
    }
107
    }
Línea 108... Línea 108...
108
 
108
 
109
    /**
109
    /**
110
     * Reset recordings test
110
     * Reset recordings test
111
     */
111
     */
112
    public function test_reset_recordings() {
112
    public function test_reset_recordings(): void {
113
        $this->initialise_mock_server();
113
        $this->initialise_mock_server();
114
        $this->resetAfterTest();
114
        $this->resetAfterTest();
115
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(null,
115
        list($bbactivitycontext, $bbactivitycm, $bbactivity) = $this->create_instance(null,
116
            ['course' => $this->get_course()->id],
116
            ['course' => $this->get_course()->id],