Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 86... Línea 86...
86
 
86
 
87
        // Test the custom link URL is saved and can be retrieved as expected.
87
        // Test the custom link URL is saved and can be retrieved as expected.
88
        $communicationprocessor->get_form_provider()->save_form_data($formdatainstance);
88
        $communicationprocessor->get_form_provider()->save_form_data($formdatainstance);
89
        $fetchedurl = $communicationprocessor->get_room_provider()->get_chat_room_url();
89
        $fetchedurl = $communicationprocessor->get_room_provider()->get_chat_room_url();
-
 
90
        $this->assertEquals($customlinkurl, $fetchedurl);
-
 
91
 
-
 
92
        // Test with empty customlinkurl.
-
 
93
        $customlinkurlempty = '';
-
 
94
        $formdatainstance = (object) ['customlinkurl' => $customlinkurlempty];
-
 
95
        $communicationprocessor->get_form_provider()->save_form_data($formdatainstance);
-
 
96
        $fetchedurl = $communicationprocessor->get_room_provider()->get_chat_room_url();
-
 
97
        // It should not update the url to an empty one.
-
 
98
        $this->assertEquals($customlinkurl, $fetchedurl);
-
 
99
 
-
 
100
        // Test with null customlinkurl.
-
 
101
        $customlinkurlempty = null;
-
 
102
        $formdatainstance = (object) ['customlinkurl' => $customlinkurlempty];
-
 
103
        $communicationprocessor->get_form_provider()->save_form_data($formdatainstance);
-
 
104
        $fetchedurl = $communicationprocessor->get_room_provider()->get_chat_room_url();
-
 
105
        // It should not update the url to a null one.
90
        $this->assertEquals($customlinkurl, $fetchedurl);
106
        $this->assertEquals($customlinkurl, $fetchedurl);
Línea 91... Línea 107...
91
    }
107
    }
92
 
108
 
93
    /**
109
    /**