Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 38... Línea 38...
38
     * Test the folder updated event.
38
     * Test the folder updated event.
39
     *
39
     *
40
     * There is no external API for updating a folder, so the unit test will simply create
40
     * There is no external API for updating a folder, so the unit test will simply create
41
     * and trigger the event and ensure the legacy log data is returned as expected.
41
     * and trigger the event and ensure the legacy log data is returned as expected.
42
     */
42
     */
43
    public function test_folder_updated() {
43
    public function test_folder_updated(): void {
44
        $this->setAdminUser();
44
        $this->setAdminUser();
45
        $course = $this->getDataGenerator()->create_course();
45
        $course = $this->getDataGenerator()->create_course();
46
        $folder = $this->getDataGenerator()->create_module('folder', array('course' => $course->id));
46
        $folder = $this->getDataGenerator()->create_module('folder', array('course' => $course->id));
Línea 47... Línea 47...
47
 
47
 
Línea 70... Línea 70...
70
     * Test the folder updated event.
70
     * Test the folder updated event.
71
     *
71
     *
72
     * There is no external API for updating a folder, so the unit test will simply create
72
     * There is no external API for updating a folder, so the unit test will simply create
73
     * and trigger the event and ensure the legacy log data is returned as expected.
73
     * and trigger the event and ensure the legacy log data is returned as expected.
74
     */
74
     */
75
    public function test_all_files_downloaded() {
75
    public function test_all_files_downloaded(): void {
76
        $this->setAdminUser();
76
        $this->setAdminUser();
77
        $course = $this->getDataGenerator()->create_course();
77
        $course = $this->getDataGenerator()->create_course();
78
        $folder = $this->getDataGenerator()->create_module('folder', array('course' => $course->id));
78
        $folder = $this->getDataGenerator()->create_module('folder', array('course' => $course->id));
79
        $context = \context_module::instance($folder->cmid);
79
        $context = \context_module::instance($folder->cmid);
80
        $cm = get_coursemodule_from_id('folder', $folder->cmid, $course->id, true, MUST_EXIST);
80
        $cm = get_coursemodule_from_id('folder', $folder->cmid, $course->id, true, MUST_EXIST);