Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 35... Línea 35...
35
 
35
 
36
    /**
36
    /**
37
     * Tests clean_param_if_not_null function
37
     * Tests clean_param_if_not_null function
38
     * @covers ::clean_param_if_not_null
38
     * @covers ::clean_param_if_not_null
39
     */
39
     */
40
    public function test_clean_param_if_not_null() {
40
    public function test_clean_param_if_not_null(): void {
41
        $this->assertNull(clean_param_if_not_null(null));
41
        $this->assertNull(clean_param_if_not_null(null));
42
        $n = '3x';
42
        $n = '3x';
43
        $this->assertEquals(clean_param($n, PARAM_INT), clean_param_if_not_null($n, PARAM_INT));
43
        $this->assertEquals(clean_param($n, PARAM_INT), clean_param_if_not_null($n, PARAM_INT));
44
        $this->assertEquals(clean_param($n, PARAM_RAW), clean_param_if_not_null($n, PARAM_RAW));
44
        $this->assertEquals(clean_param($n, PARAM_RAW), clean_param_if_not_null($n, PARAM_RAW));
Línea 51... Línea 51...
51
 
51
 
52
    /**
52
    /**
53
     * Tests contract_value function
53
     * Tests contract_value function
54
     * @covers ::contract_value
54
     * @covers ::contract_value
55
     */
55
     */
56
    public function test_contract_value() {
56
    public function test_contract_value(): void {
57
        $input = [
57
        $input = [
58
            'abc' => '<p>All together Now</p>',
58
            'abc' => '<p>All together Now</p>',
59
            'abcformat' => '1',
59
            'abcformat' => '1',
60
            'jolly' => 'Roger'
60
            'jolly' => 'Roger'
Línea 78... Línea 78...
78
 
78
 
79
    /**
79
    /**
80
     * Tests expand_value function
80
     * Tests expand_value function
81
     * @covers ::expand_value
81
     * @covers ::expand_value
82
     */
82
     */
83
    public function test_expand_value() {
83
    public function test_expand_value(): void {
84
        $input = [
84
        $input = [
85
            'abc_editor' => [ 'text' => '<p>All together Now</p>', 'format' => '1' ],
85
            'abc_editor' => [ 'text' => '<p>All together Now</p>', 'format' => '1' ],
86
            'jolly' => 'Roger',
86
            'jolly' => 'Roger',
87
        ];
87
        ];