Proyectos de Subversion Moodle

Rev

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

Rev 11 Rev 1441
Línea 27... Línea 27...
27
 *
27
 *
28
 * @package   core_analytics
28
 * @package   core_analytics
29
 * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com}
29
 * @copyright 2017 David Monllaó {@link http://www.davidmonllao.com}
30
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
30
 * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
31
 */
31
 */
32
class indicator_test extends \advanced_testcase {
32
final class indicator_test extends \advanced_testcase {
33
 
-
 
34
    /**
33
    /**
35
     * test_validate_calculated_value
34
     * test_validate_calculated_value
36
     *
35
     *
37
     * @param string $indicatorclass
36
     * @param string $indicatorclass
38
     * @param array $returnedvalue
37
     * @param array $returnedvalue
Línea 48... Línea 47...
48
    /**
47
    /**
49
     * Data provider for test_validate_calculated_value
48
     * Data provider for test_validate_calculated_value
50
     *
49
     *
51
     * @return array
50
     * @return array
52
     */
51
     */
53
    public function validate_calculated_value() {
52
    public static function validate_calculated_value(): array {
54
        return [
53
        return [
55
            'max' => ['test_indicator_max', [1]],
54
            'max' => ['test_indicator_max', [1]],
56
            'min' => ['test_indicator_min', [-1]],
55
            'min' => ['test_indicator_min', [-1]],
57
            'discrete' => ['test_indicator_discrete', [0, 0, 0, 0, 1]],
56
            'discrete' => ['test_indicator_discrete', [0, 0, 0, 0, 1]],
58
        ];
57
        ];
Línea 81... Línea 80...
81
    /**
80
    /**
82
     * Data provider for test_validate_calculated_value_exceptions
81
     * Data provider for test_validate_calculated_value_exceptions
83
     *
82
     *
84
     * @return array
83
     * @return array
85
     */
84
     */
86
    public function validate_calculated_value_exceptions() {
85
    public static function validate_calculated_value_exceptions(): array {
87
        return [
86
        return [
88
            'max' => ['test_indicator_max', 2],
87
            'max' => ['test_indicator_max', 2],
89
            'min' => ['test_indicator_min', -2],
88
            'min' => ['test_indicator_min', -2],
90
            'discrete' => ['test_indicator_discrete', 7],
89
            'discrete' => ['test_indicator_discrete', 7],
91
        ];
90
        ];