Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 33... Línea 33...
33
 *
33
 *
34
 * @package    core
34
 * @package    core
35
 * @copyright  2017 Juan Leyva
35
 * @copyright  2017 Juan Leyva
36
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
37
 */
37
 */
38
class login_lib_test extends \advanced_testcase {
38
final class login_lib_test extends \advanced_testcase {
Línea 39... Línea 39...
39
 
39
 
40
    public function test_core_login_process_password_reset_one_time_without_username_protection(): void {
40
    public function test_core_login_process_password_reset_one_time_without_username_protection(): void {
Línea 41... Línea 41...
41
        global $CFG;
41
        global $CFG;
Línea 181... Línea 181...
181
 
181
 
182
    public function test_core_login_process_password_reset_auth_not_supporting_email_reset(): void {
182
    public function test_core_login_process_password_reset_auth_not_supporting_email_reset(): void {
Línea 183... Línea 183...
183
        global $CFG;
183
        global $CFG;
184
 
184
 
185
        $this->resetAfterTest();
185
        $this->resetAfterTest();
Línea 186... Línea 186...
186
        $CFG->auth = $CFG->auth . ',mnet';
186
        $CFG->auth = $CFG->auth . ',ldap';
Línea 187... Línea 187...
187
        $user = $this->getDataGenerator()->create_user(array('auth' => 'mnet'));
187
        $user = $this->getDataGenerator()->create_user(['auth' => 'ldap']);
188
 
188
 
Línea 231... Línea 231...
231
    }
231
    }
Línea 232... Línea 232...
232
 
232
 
233
    /**
233
    /**
234
     * Data provider for \core_login_lib_testcase::test_core_login_validate_forgot_password_data().
234
     * Data provider for \core_login_lib_testcase::test_core_login_validate_forgot_password_data().
235
     */
235
     */
236
    public function forgot_password_data_provider() {
236
    public static function forgot_password_data_provider(): array {
237
        return [
237
        return [
238
            'Both username and password supplied' => [
238
            'Both username and password supplied' => [
239
                [
239
                [
240
                    'username' => 's1',
240
                    'username' => 's1',