Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 133... Línea 133...
133
    }
133
    }
Línea 134... Línea 134...
134
 
134
 
135
    /**
135
    /**
136
     * Testcase for testing conversion of seconds to the best possible unit with a non-default default unit.
136
     * Testcase for testing conversion of seconds to the best possible unit with a non-default default unit.
137
     */
137
     */
138
    public function test_seconds_to_unit_different_default_unit() {
138
    public function test_seconds_to_unit_different_default_unit(): void {
139
        $mform = $this->get_test_form();
139
        $mform = $this->get_test_form();
140
        $element = $mform->addElement('duration', 'testel', null,
140
        $element = $mform->addElement('duration', 'testel', null,
141
                ['defaultunit' => DAYSECS, 'optional' => false]);
141
                ['defaultunit' => DAYSECS, 'optional' => false]);
142
        $this->assertEquals([0, DAYSECS], $element->seconds_to_unit(0));
142
        $this->assertEquals([0, DAYSECS], $element->seconds_to_unit(0));