Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 66... Línea 66...
66
        $this->field2 = $this->getDataGenerator()->create_custom_profile_field(array(
66
        $this->field2 = $this->getDataGenerator()->create_custom_profile_field(array(
67
                'shortname' => 'sometext', 'name' => 'Some text in textarea',
67
                'shortname' => 'sometext', 'name' => 'Some text in textarea',
68
                'datatype' => 'textarea', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 2))->id;
68
                'datatype' => 'textarea', 'signup' => 1, 'visible' => 1, 'required' => 1, 'sortorder' => 2))->id;
69
    }
69
    }
Línea 70... Línea 70...
70
 
70
 
71
    public function test_get_signup_settings() {
71
    public function test_get_signup_settings(): void {
Línea 72... Línea 72...
72
        global $CFG;
72
        global $CFG;
73
 
73
 
74
        $CFG->defaultcity = 'Bcn';
74
        $CFG->defaultcity = 'Bcn';
Línea 111... Línea 111...
111
    }
111
    }
Línea 112... Línea 112...
112
 
112
 
113
    /**
113
    /**
114
     * Test get_signup_settings with mathjax in a profile field.
114
     * Test get_signup_settings with mathjax in a profile field.
115
     */
115
     */
116
    public function test_get_signup_settings_with_mathjax_in_profile_fields() {
116
    public function test_get_signup_settings_with_mathjax_in_profile_fields(): void {
117
        // Enable MathJax filter in content and headings.
117
        // Enable MathJax filter in content and headings.
118
        $this->configure_filters([
118
        $this->configure_filters([
119
            ['name' => 'mathjaxloader', 'state' => TEXTFILTER_ON, 'move' => -1, 'applytostrings' => true],
119
            ['name' => 'mathjaxloader', 'state' => TEXTFILTER_ON, 'move' => -1, 'applytostrings' => true],
Línea 149... Línea 149...
149
                $namedarray['mathjaxname']['name']);
149
                $namedarray['mathjaxname']['name']);
150
        $this->assertEquals($categoryname, $namedarray['mathjaxname']['categoryname']);
150
        $this->assertEquals($categoryname, $namedarray['mathjaxname']['categoryname']);
151
        $this->assertEquals($fieldname, $namedarray['mathjaxname']['name']);
151
        $this->assertEquals($fieldname, $namedarray['mathjaxname']['name']);
152
    }
152
    }
Línea 153... Línea 153...
153
 
153
 
154
    public function test_signup_user() {
154
    public function test_signup_user(): void {
Línea 155... Línea 155...
155
        global $DB;
155
        global $DB;
156
 
156
 
157
        $username = 'pepe';
157
        $username = 'pepe';