Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 24... Línea 24...
24
 * @package    core_question
24
 * @package    core_question
25
 * @category   test
25
 * @category   test
26
 * @copyright  2018 Shamim Rezaie <shamim@moodle.com>
26
 * @copyright  2018 Shamim Rezaie <shamim@moodle.com>
27
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28
 */
28
 */
29
class calculated_question_summary_test extends \advanced_testcase {
29
final class calculated_question_summary_test extends \advanced_testcase {
Línea 30... Línea 30...
30
 
30
 
31
    /**
31
    /**
32
     * Provider for test_get_min_max_of.
32
     * Provider for test_get_min_max_of.
33
     *
33
     *
34
     * @return array
34
     * @return array
35
     */
35
     */
36
    public function get_min_max_provider() {
36
    public static function get_min_max_provider(): array {
37
        return [
37
        return [
38
            'negative number and null' => [
38
            'negative number and null' => [
39
                [
39
                [
40
                    (object)['questionid' => 1, 'index' => 2],
40
                    (object)['questionid' => 1, 'index' => 2],
Línea 103... Línea 103...
103
    /**
103
    /**
104
     * Provider for test_get_min_max_of.
104
     * Provider for test_get_min_max_of.
105
     *
105
     *
106
     * @return array
106
     * @return array
107
     */
107
     */
108
    public function get_sd_min_max_provider() {
108
    public static function get_sd_min_max_provider(): array {
109
        return [
109
        return [
110
            'null and number' => [
110
            'null and number' => [
111
                [
111
                [
112
                    (object)['questionid' => 1, 'sd' => 0.2, 'maxmark' => 0.5],
112
                    (object)['questionid' => 1, 'sd' => 0.2, 'maxmark' => 0.5],
113
                    (object)['questionid' => 2, 'sd' => null, 'maxmark' => 1],
113
                    (object)['questionid' => 2, 'sd' => null, 'maxmark' => 1],