Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 43... Línea 43...
43
     * We have not determined if we will do this or not, but we provide the functionality and encourgae people to use
43
     * We have not determined if we will do this or not, but we provide the functionality and encourgae people to use
44
     * it so that it can be retrospectively fitted if required.
44
     * it so that it can be retrospectively fitted if required.
45
     *
45
     *
46
     * @covers ::user
46
     * @covers ::user
47
     */
47
     */
48
    public function test_user() {
48
    public function test_user(): void {
49
        // Note: This test currently sucks, but there's no point creating users just to test this.
49
        // Note: This test currently sucks, but there's no point creating users just to test this.
50
        for ($i = 0; $i < 10; $i++) {
50
        for ($i = 0; $i < 10; $i++) {
51
            $this->assertEquals($i, transform::user($i));
51
            $this->assertEquals($i, transform::user($i));
52
        }
52
        }
53
    }
53
    }
Línea 55... Línea 55...
55
    /**
55
    /**
56
     * Test that the datetime is translated into a string.
56
     * Test that the datetime is translated into a string.
57
     *
57
     *
58
     * @covers ::datetime
58
     * @covers ::datetime
59
     */
59
     */
60
    public function test_datetime() {
60
    public function test_datetime(): void {
61
        $time = 1;
61
        $time = 1;
Línea 62... Línea 62...
62
 
62
 
Línea 63... Línea 63...
63
        $datestr = transform::datetime($time);
63
        $datestr = transform::datetime($time);
Línea 77... Línea 77...
77
    /**
77
    /**
78
     * Test that the date is translated into a string.
78
     * Test that the date is translated into a string.
79
     *
79
     *
80
     * @covers ::date
80
     * @covers ::date
81
     */
81
     */
82
    public function test_date() {
82
    public function test_date(): void {
83
        $time = 1;
83
        $time = 1;
Línea 84... Línea 84...
84
 
84
 
Línea 85... Línea 85...
85
        $datestr = transform::date($time);
85
        $datestr = transform::date($time);
Línea 99... Línea 99...
99
     * @dataProvider yesno_provider
99
     * @dataProvider yesno_provider
100
     * @param   mixed   $input The input to test
100
     * @param   mixed   $input The input to test
101
     * @param   string  $expected The expected value
101
     * @param   string  $expected The expected value
102
     * @covers ::yesno
102
     * @covers ::yesno
103
     */
103
     */
104
    public function test_yesno($input, $expected) {
104
    public function test_yesno($input, $expected): void {
105
        $this->assertEquals($expected, transform::yesno($input));
105
        $this->assertEquals($expected, transform::yesno($input));
106
    }
106
    }
Línea 107... Línea 107...
107
 
107
 
108
    /**
108
    /**