Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 62... Línea 62...
62
    }
62
    }
Línea 63... Línea 63...
63
 
63
 
64
    /**
64
    /**
65
     * Tests for attempt deleted event
65
     * Tests for attempt deleted event
66
     */
66
     */
Línea 67... Línea 67...
67
    public function test_attempt_deleted_event() {
67
    public function test_attempt_deleted_event(): void {
Línea 68... Línea 68...
68
 
68
 
69
        global $USER;
69
        global $USER;
Línea 94... Línea 94...
94
    }
94
    }
Línea 95... Línea 95...
95
 
95
 
96
    /**
96
    /**
97
     * Tests for interactions viewed validations.
97
     * Tests for interactions viewed validations.
98
     */
98
     */
99
    public function test_interactions_viewed_event_validations() {
99
    public function test_interactions_viewed_event_validations(): void {
100
        $this->resetAfterTest();
100
        $this->resetAfterTest();
101
        try {
101
        try {
102
            \mod_scorm\event\interactions_viewed::create(array(
102
            \mod_scorm\event\interactions_viewed::create(array(
103
                'context' => \context_module::instance($this->eventcm->id),
103
                'context' => \context_module::instance($this->eventcm->id),
Línea 123... Línea 123...
123
    }
123
    }
Línea 124... Línea 124...
124
 
124
 
125
    /**
125
    /**
126
     * Tests for tracks viewed event validations.
126
     * Tests for tracks viewed event validations.
127
     */
127
     */
128
    public function test_tracks_viewed_event_validations() {
128
    public function test_tracks_viewed_event_validations(): void {
129
        $this->resetAfterTest();
129
        $this->resetAfterTest();
130
        try {
130
        try {
131
            \mod_scorm\event\tracks_viewed::create(array(
131
            \mod_scorm\event\tracks_viewed::create(array(
132
                'context' => \context_module::instance($this->eventcm->id),
132
                'context' => \context_module::instance($this->eventcm->id),
Línea 164... Línea 164...
164
    }
164
    }
Línea 165... Línea 165...
165
 
165
 
166
    /**
166
    /**
167
     * Tests for userreport viewed event validations.
167
     * Tests for userreport viewed event validations.
168
     */
168
     */
169
    public function test_user_report_viewed_event_validations() {
169
    public function test_user_report_viewed_event_validations(): void {
170
        $this->resetAfterTest();
170
        $this->resetAfterTest();
171
        try {
171
        try {
172
            \mod_scorm\event\user_report_viewed::create(array(
172
            \mod_scorm\event\user_report_viewed::create(array(
173
                'context' => \context_module::instance($this->eventcm->id),
173
                'context' => \context_module::instance($this->eventcm->id),
Línea 253... Línea 253...
253
     * @param string $cmielement a valid CMI raw score element
253
     * @param string $cmielement a valid CMI raw score element
254
     * @param string $cmivalue a valid CMI raw score value
254
     * @param string $cmivalue a valid CMI raw score value
255
     * @param string $failmessage the message used to fail the test in case of missing to violate a validation rule
255
     * @param string $failmessage the message used to fail the test in case of missing to violate a validation rule
256
     * @param string $excmessage the exception message when violating the validations rules
256
     * @param string $excmessage the exception message when violating the validations rules
257
     */
257
     */
258
    public function test_scoreraw_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage) {
258
    public function test_scoreraw_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage): void {
259
        $this->resetAfterTest();
259
        $this->resetAfterTest();
260
        try {
260
        try {
261
            $data = array(
261
            $data = array(
262
                'context' => \context_module::instance($this->eventcm->id),
262
                'context' => \context_module::instance($this->eventcm->id),
263
                'courseid' => $this->eventcourse->id,
263
                'courseid' => $this->eventcourse->id,
Línea 347... Línea 347...
347
     * @param string $cmielement a valid CMI status element
347
     * @param string $cmielement a valid CMI status element
348
     * @param string $cmivalue a valid CMI status value
348
     * @param string $cmivalue a valid CMI status value
349
     * @param string $failmessage the message used to fail the test in case of missing to violate a validation rule
349
     * @param string $failmessage the message used to fail the test in case of missing to violate a validation rule
350
     * @param string $excmessage the exception message when violating the validations rules
350
     * @param string $excmessage the exception message when violating the validations rules
351
     */
351
     */
352
    public function test_status_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage) {
352
    public function test_status_submitted_event_validations($cmielement, $cmivalue, $failmessage, $excmessage): void {
353
        $this->resetAfterTest();
353
        $this->resetAfterTest();
354
        try {
354
        try {
355
            $data = array(
355
            $data = array(
356
                'context' => \context_module::instance($this->eventcm->id),
356
                'context' => \context_module::instance($this->eventcm->id),
357
                'courseid' => $this->eventcourse->id,
357
                'courseid' => $this->eventcourse->id,