Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 41... Línea 41...
41
class baseoptigroup_test extends \basic_testcase {
41
class baseoptigroup_test extends \basic_testcase {
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Correct creation tests (s)
44
     * Correct creation tests (s)
45
     */
45
     */
46
    function test_creation() {
46
    function test_creation(): void {
47
        $instance = new mock_base_optigroup('optigroup', null, true);
47
        $instance = new mock_base_optigroup('optigroup', null, true);
48
        $this->assertInstanceOf('base_optigroup', $instance);
48
        $this->assertInstanceOf('base_optigroup', $instance);
49
        $this->assertEquals($instance->get_name(), 'optigroup');
49
        $this->assertEquals($instance->get_name(), 'optigroup');
50
        $this->assertNull($instance->get_parent());
50
        $this->assertNull($instance->get_parent());
Línea 75... Línea 75...
75
    }
75
    }
Línea 76... Línea 76...
76
 
76
 
77
    /**
77
    /**
78
     * Incorrect creation tests (attributes and final elements)
78
     * Incorrect creation tests (attributes and final elements)
79
     */
79
     */
Línea 80... Línea 80...
80
    function test_wrong_creation() {
80
    function test_wrong_creation(): void {
81
 
81
 
82
        // Create instance with invalid name
82
        // Create instance with invalid name
83
        try {
83
        try {