Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 28... Línea 28...
28
    /**
28
    /**
29
     * Ensure that the get_effective_context_value only errors if provided an inappropriate element.
29
     * Ensure that the get_effective_context_value only errors if provided an inappropriate element.
30
     *
30
     *
31
     * This test is not great because we only test a limited set of values. This is a fault of the underlying API.
31
     * This test is not great because we only test a limited set of values. This is a fault of the underlying API.
32
     */
32
     */
33
    public function test_get_effective_context_value_invalid_element() {
33
    public function test_get_effective_context_value_invalid_element(): void {
34
        $this->expectException(\coding_exception::class);
34
        $this->expectException(\coding_exception::class);
35
        data_registry::get_effective_context_value(\context_system::instance(), 'invalid');
35
        data_registry::get_effective_context_value(\context_system::instance(), 'invalid');
36
    }
36
    }
Línea 37... Línea 37...
37
 
37
 
38
    /**
38
    /**
39
     * Ensure that the get_effective_contextlevel_value only errors if provided an inappropriate element.
39
     * Ensure that the get_effective_contextlevel_value only errors if provided an inappropriate element.
40
     *
40
     *
41
     * This test is not great because we only test a limited set of values. This is a fault of the underlying API.
41
     * This test is not great because we only test a limited set of values. This is a fault of the underlying API.
42
     */
42
     */
43
    public function test_get_effective_contextlevel_value_invalid_element() {
43
    public function test_get_effective_contextlevel_value_invalid_element(): void {
44
        $this->expectException(\coding_exception::class);
44
        $this->expectException(\coding_exception::class);
45
        data_registry::get_effective_contextlevel_value(\context_system::instance(), 'invalid');
45
        data_registry::get_effective_contextlevel_value(\context_system::instance(), 'invalid');
46
    }
46
    }