Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 36... Línea 36...
36
 * @covers     \core_xapi\external\post_state
36
 * @covers     \core_xapi\external\post_state
37
 * @since      Moodle 4.2
37
 * @since      Moodle 4.2
38
 * @copyright  2023 Sara Arjona (sara@moodle.com)
38
 * @copyright  2023 Sara Arjona (sara@moodle.com)
39
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
39
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
40
 */
40
 */
41
class post_state_test extends externallib_advanced_testcase {
41
final class post_state_test extends externallib_advanced_testcase {
Línea 42... Línea 42...
42
 
42
 
43
    /**
43
    /**
44
     * Setup to ensure that fixtures are loaded.
44
     * Setup to ensure that fixtures are loaded.
45
     */
45
     */
46
    public static function setUpBeforeClass(): void {
46
    public static function setUpBeforeClass(): void {
47
        global $CFG;
47
        global $CFG;
-
 
48
        require_once($CFG->dirroot . '/lib/xapi/tests/helper.php');
48
        require_once($CFG->dirroot . '/lib/xapi/tests/helper.php');
49
        parent::setUpBeforeClass();
Línea 49... Línea 50...
49
    }
50
    }
50
 
51
 
51
    /**
52
    /**
Línea 70... Línea 71...
70
    /**
71
    /**
71
     * Data provider for the test_component_names tests.
72
     * Data provider for the test_component_names tests.
72
     *
73
     *
73
     * @return  array
74
     * @return  array
74
     */
75
     */
75
    public function components_provider(): array {
76
    public static function components_provider(): array {
76
        return [
77
        return [
77
            'Inexistent component' => [
78
            'Inexistent component' => [
78
                'component' => 'inexistent_component',
79
                'component' => 'inexistent_component',
79
                'expected' => null,
80
                'expected' => null,
80
            ],
81
            ],
Línea 133... Línea 134...
133
    /**
134
    /**
134
     * Data provider for the test_post_state tests.
135
     * Data provider for the test_post_state tests.
135
     *
136
     *
136
     * @return array
137
     * @return array
137
     */
138
     */
138
    public function states_provider(): array {
139
    public static function states_provider(): array {
139
        return [
140
        return [
140
            'Empty stateid' => [
141
            'Empty stateid' => [
141
                'stateid' => '',
142
                'stateid' => '',
142
                'expected' => 'true',
143
                'expected' => 'true',
143
            ],
144
            ],