Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 37... Línea 37...
37
 * @covers     \core_xapi\external\delete_state
37
 * @covers     \core_xapi\external\delete_state
38
 * @since      Moodle 4.2
38
 * @since      Moodle 4.2
39
 * @copyright  2023 Sara Arjona (sara@moodle.com)
39
 * @copyright  2023 Sara Arjona (sara@moodle.com)
40
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
40
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
41
 */
41
 */
42
class delete_state_test extends externallib_advanced_testcase {
42
final class delete_state_test extends externallib_advanced_testcase {
Línea 43... Línea 43...
43
 
43
 
44
    /**
44
    /**
45
     * Setup to ensure that fixtures are loaded.
45
     * Setup to ensure that fixtures are loaded.
46
     */
46
     */
47
    public static function setUpBeforeClass(): void {
47
    public static function setUpBeforeClass(): void {
48
        global $CFG;
48
        global $CFG;
-
 
49
        require_once($CFG->dirroot . '/lib/xapi/tests/helper.php');
49
        require_once($CFG->dirroot . '/lib/xapi/tests/helper.php');
50
        parent::setUpBeforeClass();
Línea 50... Línea 51...
50
    }
51
    }
51
 
52
 
52
    /**
53
    /**
Línea 71... Línea 72...
71
    /**
72
    /**
72
     * Data provider for the test_component_names tests.
73
     * Data provider for the test_component_names tests.
73
     *
74
     *
74
     * @return  array
75
     * @return  array
75
     */
76
     */
76
    public function components_provider(): array {
77
    public static function components_provider(): array {
77
        return [
78
        return [
78
            'Inexistent component' => [
79
            'Inexistent component' => [
79
                'component' => 'inexistent_component',
80
                'component' => 'inexistent_component',
80
                'expected' => null,
81
                'expected' => null,
81
            ],
82
            ],
Línea 148... Línea 149...
148
    /**
149
    /**
149
     * Data provider for the test_get_state tests.
150
     * Data provider for the test_get_state tests.
150
     *
151
     *
151
     * @return array
152
     * @return array
152
     */
153
     */
153
    public function states_provider(): array {
154
    public static function states_provider(): array {
154
        return [
155
        return [
155
            'Existing and valid state' => [
156
            'Existing and valid state' => [
156
                'info' => [],
157
                'info' => [],
157
                'expected' => 'true',
158
                'expected' => 'true',
158
            ],
159
            ],