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
        unset($enabled['paypal']);
38
        unset($enabled['paypal']);
39
        $enabled = array_keys($enabled);
39
        $enabled = array_keys($enabled);
40
        set_config('enrol_plugins_enabled', implode(',', $enabled));
40
        set_config('enrol_plugins_enabled', implode(',', $enabled));
41
    }
41
    }
Línea 42... Línea 42...
42
 
42
 
43
    public function test_basics() {
43
    public function test_basics(): void {
44
        $this->assertFalse(enrol_is_enabled('paypal'));
44
        $this->assertFalse(enrol_is_enabled('paypal'));
45
        $plugin = enrol_get_plugin('paypal');
45
        $plugin = enrol_get_plugin('paypal');
46
        $this->assertInstanceOf('enrol_paypal_plugin', $plugin);
46
        $this->assertInstanceOf('enrol_paypal_plugin', $plugin);
47
        $this->assertEquals(ENROL_EXT_REMOVED_SUSPENDNOROLES, get_config('enrol_paypal', 'expiredaction'));
47
        $this->assertEquals(ENROL_EXT_REMOVED_SUSPENDNOROLES, get_config('enrol_paypal', 'expiredaction'));
Línea 48... Línea 48...
48
    }
48
    }
49
 
49
 
Línea 50... Línea 50...
50
    public function test_sync_nothing() {
50
    public function test_sync_nothing(): void {
51
        $this->resetAfterTest();
51
        $this->resetAfterTest();
Línea 52... Línea 52...
52
 
52
 
53
        $this->enable_plugin();
53
        $this->enable_plugin();
54
        $paypalplugin = enrol_get_plugin('paypal');
54
        $paypalplugin = enrol_get_plugin('paypal');
Línea 55... Línea 55...
55
 
55
 
56
        // Just make sure the sync does not throw any errors when nothing to do.
56
        // Just make sure the sync does not throw any errors when nothing to do.
57
        $paypalplugin->sync(new \null_progress_trace());
57
        $paypalplugin->sync(new \null_progress_trace());
Línea 58... Línea 58...
58
    }
58
    }
59
 
59
 
Línea 168... Línea 168...
168
    }
168
    }
Línea 169... Línea 169...
169
 
169
 
170
    /**
170
    /**
171
     * Test for getting user enrolment actions.
171
     * Test for getting user enrolment actions.
172
     */
172
     */
173
    public function test_get_user_enrolment_actions() {
173
    public function test_get_user_enrolment_actions(): void {
174
        global $CFG, $PAGE;
174
        global $CFG, $PAGE;
Línea 175... Línea 175...
175
        $this->resetAfterTest();
175
        $this->resetAfterTest();
176
 
176