Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 111... Línea 111...
111
 
111
 
112
        $this->resetAfterTest();
112
        $this->resetAfterTest();
Línea 113... Línea 113...
113
        $this->setAdminUser();
113
        $this->setAdminUser();
114
 
-
 
115
        $course = $this->getDataGenerator()->create_course(['numsections' => 2, 'format' => 'topics']);
-
 
116
        // Section 2 has an existing delegate class.
-
 
117
        course_update_section(
-
 
118
            $course,
-
 
119
            $DB->get_record('course_sections', ['course' => $course->id, 'section' => 2]),
-
 
120
            [
-
 
121
                'component' => 'test_component',
-
 
122
                'itemid' => 1,
-
 
Línea 123... Línea 114...
123
            ]
114
 
124
        );
115
        $course = $this->getDataGenerator()->create_course(['numsections' => 2, 'format' => 'topics']);
Línea 125... Línea 116...
125
 
116
 
Línea 131... Línea 122...
131
 
122
 
Línea 132... Línea 123...
132
        $this->assertEquals(count($originalsections), count($restoredsections));
123
        $this->assertEquals(count($originalsections), count($restoredsections));
Línea 133... Línea -...
133
 
-
 
134
        $validatefields = ['name', 'summary', 'summaryformat', 'visible', 'component', 'itemid'];
-
 
135
 
124
 
136
        $this->assertEquals($originalsections[1]->name, $restoredsections[1]->name);
125
        $validatefields = ['name', 'summary', 'summaryformat', 'visible', 'component', 'itemid'];
137
 
126
 
138
        foreach ($validatefields as $field) {
127
        foreach ($validatefields as $field) {