Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 25... Línea 25...
25
 */
25
 */
26
class component_test extends \advanced_testcase {
26
class component_test extends \advanced_testcase {
27
    /**
27
    /**
28
     * Tests loading a class from /availability/classes.
28
     * Tests loading a class from /availability/classes.
29
     */
29
     */
30
    public function test_load_class() {
30
    public function test_load_class(): void {
31
        $result = get_class_methods('\core_availability\info');
31
        $result = get_class_methods('\core_availability\info');
32
        $this->assertTrue(is_array($result));
32
        $this->assertTrue(is_array($result));
33
    }
33
    }
Línea 34... Línea 34...
34
 
34
 
35
    /**
35
    /**
36
     * Tests the plugininfo class is present and working.
36
     * Tests the plugininfo class is present and working.
37
     */
37
     */
38
    public function test_plugin_info() {
38
    public function test_plugin_info(): void {
39
        // This code will throw debugging information if the plugininfo class
39
        // This code will throw debugging information if the plugininfo class
40
        // is missing. Unfortunately it doesn't actually cause the test to
40
        // is missing. Unfortunately it doesn't actually cause the test to
41
        // fail, but it's obvious when running test at least.
41
        // fail, but it's obvious when running test at least.
42
        $pluginmanager = \core_plugin_manager::instance();
42
        $pluginmanager = \core_plugin_manager::instance();