Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 11
Línea 47... Línea 47...
47
    }
47
    }
Línea 48... Línea 48...
48
 
48
 
49
    /**
49
    /**
50
     * Test the behaviour of getPlatformInfo().
50
     * Test the behaviour of getPlatformInfo().
51
     */
51
     */
52
    public function test_getPlatformInfo() {
52
    public function test_getPlatformInfo(): void {
Línea 53... Línea 53...
53
        global $CFG;
53
        global $CFG;
Línea 54... Línea 54...
54
 
54
 
Línea 68... Línea 68...
68
     *
68
     *
69
     * This test is intensive and requires downloading content of an external file,
69
     * This test is intensive and requires downloading content of an external file,
70
     * therefore it might take longer time to execute.
70
     * therefore it might take longer time to execute.
71
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
71
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
72
     */
72
     */
73
    public function test_fetchExternalData_no_path_defined() {
73
    public function test_fetchExternalData_no_path_defined(): void {
Línea 74... Línea 74...
74
 
74
 
75
        if (!PHPUNIT_LONGTEST) {
75
        if (!PHPUNIT_LONGTEST) {
76
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
76
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
Línea 99... Línea 99...
99
     *
99
     *
100
     * This test is intensive and requires downloading content of an external file,
100
     * This test is intensive and requires downloading content of an external file,
101
     * therefore it might take longer time to execute.
101
     * therefore it might take longer time to execute.
102
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
102
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
103
     */
103
     */
104
    public function test_fetchExternalData_path_defined() {
104
    public function test_fetchExternalData_path_defined(): void {
105
        global $CFG;
105
        global $CFG;
Línea 106... Línea 106...
106
 
106
 
107
        if (!PHPUNIT_LONGTEST) {
107
        if (!PHPUNIT_LONGTEST) {
108
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
108
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
Línea 132... Línea 132...
132
     *
132
     *
133
     * This test is intensive and requires downloading content of an external file,
133
     * This test is intensive and requires downloading content of an external file,
134
     * therefore it might take longer time to execute.
134
     * therefore it might take longer time to execute.
135
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
135
     * In order to execute this test PHPUNIT_LONGTEST should be set to true in phpunit.xml or directly in config.php.
136
     */
136
     */
137
    public function test_fetchExternalData_url_not_h5p() {
137
    public function test_fetchExternalData_url_not_h5p(): void {
Línea 138... Línea 138...
138
 
138
 
139
        if (!PHPUNIT_LONGTEST) {
139
        if (!PHPUNIT_LONGTEST) {
140
            // This test is intensive and requires downloading the content of an external file.
140
            // This test is intensive and requires downloading the content of an external file.
141
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
141
            $this->markTestSkipped('PHPUNIT_LONGTEST is not defined');
Línea 159... Línea 159...
159
    }
159
    }
Línea 160... Línea 160...
160
 
160
 
161
    /**
161
    /**
162
     * Test the behaviour of fetchExternalData() when the URL is invalid.
162
     * Test the behaviour of fetchExternalData() when the URL is invalid.
163
     */
163
     */
164
    public function test_fetchExternalData_url_invalid() {
164
    public function test_fetchExternalData_url_invalid(): void {
165
        // Provide an invalid URL to an external file.
165
        // Provide an invalid URL to an external file.
Línea 166... Línea 166...
166
        $url = "someprotocol://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf";
166
        $url = "someprotocol://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf";
Línea 172... Línea 172...
172
    }
172
    }
Línea 173... Línea 173...
173
 
173
 
174
    /**
174
    /**
175
     * Test the behaviour of setLibraryTutorialUrl().
175
     * Test the behaviour of setLibraryTutorialUrl().
176
     */
176
     */
177
    public function test_setLibraryTutorialUrl() {
177
    public function test_setLibraryTutorialUrl(): void {
Línea 178... Línea 178...
178
        global $DB;
178
        global $DB;
Línea 179... Línea 179...
179
 
179
 
Línea 221... Línea 221...
221
    }
221
    }
Línea 222... Línea 222...
222
 
222
 
223
    /**
223
    /**
224
     * Test the behaviour of setErrorMessage().
224
     * Test the behaviour of setErrorMessage().
225
     */
225
     */
226
    public function test_setErrorMessage() {
226
    public function test_setErrorMessage(): void {
227
        // Set an error message and an error code.
227
        // Set an error message and an error code.
228
        $message = "Error message";
228
        $message = "Error message";
Línea 229... Línea 229...
229
        $code = '404';
229
        $code = '404';
Línea 242... Línea 242...
242
    }
242
    }
Línea 243... Línea 243...
243
 
243
 
244
    /**
244
    /**
245
     * Test the behaviour of setInfoMessage().
245
     * Test the behaviour of setInfoMessage().
246
     */
246
     */
247
    public function test_setInfoMessage() {
247
    public function test_setInfoMessage(): void {
Línea 248... Línea 248...
248
        $message = "Info message";
248
        $message = "Info message";
249
 
249
 
Línea 259... Línea 259...
259
    }
259
    }
Línea 260... Línea 260...
260
 
260
 
261
    /**
261
    /**
262
     * Test the behaviour of getMessages() when requesting the info messages.
262
     * Test the behaviour of getMessages() when requesting the info messages.
263
     */
263
     */
264
    public function test_getMessages_info() {
264
    public function test_getMessages_info(): void {
265
        // Set an info message.
265
        // Set an info message.
266
        $this->framework->setInfoMessage("Info message");
266
        $this->framework->setInfoMessage("Info message");
267
        // Set an error message.
267
        // Set an error message.
Línea 283... Línea 283...
283
    }
283
    }
Línea 284... Línea 284...
284
 
284
 
285
    /**
285
    /**
286
     * Test the behaviour of getMessages() when requesting the error messages.
286
     * Test the behaviour of getMessages() when requesting the error messages.
287
     */
287
     */
288
    public function test_getMessages_error() {
288
    public function test_getMessages_error(): void {
289
        // Set an info message.
289
        // Set an info message.
290
        $this->framework->setInfoMessage("Info message");
290
        $this->framework->setInfoMessage("Info message");
291
        // Set an error message.
291
        // Set an error message.
292
        $this->framework->setErrorMessage("Error message 1", 404);
292
        $this->framework->setErrorMessage("Error message 1", 404);
Línea 319... Línea 319...
319
    }
319
    }
Línea 320... Línea 320...
320
 
320
 
321
    /**
321
    /**
322
     * Test the behaviour of t() when translating existing string that does not require any arguments.
322
     * Test the behaviour of t() when translating existing string that does not require any arguments.
323
     */
323
     */
324
    public function test_t_existing_string_no_args() {
324
    public function test_t_existing_string_no_args(): void {
325
        // Existing language string without passed arguments.
325
        // Existing language string without passed arguments.
Línea 326... Línea 326...
326
        $translation = $this->framework->t('No copyright information available for this content.');
326
        $translation = $this->framework->t('No copyright information available for this content.');
327
 
327
 
328
        // Make sure the string translation has been returned.
328
        // Make sure the string translation has been returned.
Línea 329... Línea 329...
329
        $this->assertEquals('No copyright information available for this content.', $translation);
329
        $this->assertEquals('No copyright information available for this content.', $translation);
330
    }
330
    }
331
 
331
 
332
    /**
332
    /**
333
     * Test the behaviour of t() when translating existing string that does require parameters.
333
     * Test the behaviour of t() when translating existing string that does require parameters.
334
     */
334
     */
335
    public function test_t_existing_string_args() {
335
    public function test_t_existing_string_args(): void {
Línea 336... Línea 336...
336
        // Existing language string with passed arguments.
336
        // Existing language string with passed arguments.
Línea 342... Línea 342...
342
    }
342
    }
Línea 343... Línea 343...
343
 
343
 
344
    /**
344
    /**
345
     * Test the behaviour of t() when translating non-existent string.
345
     * Test the behaviour of t() when translating non-existent string.
346
     */
346
     */
347
    public function test_t_non_existent_string() {
347
    public function test_t_non_existent_string(): void {
348
        // Non-existing language string.
348
        // Non-existing language string.
Línea 349... Línea 349...
349
        $message = 'Random message %option';
349
        $message = 'Random message %option';
Línea 359... Línea 359...
359
 
359
 
360
    /**
360
    /**
361
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from an existing library and
361
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from an existing library and
362
     * the folder name is parsable.
362
     * the folder name is parsable.
363
     **/
363
     **/
364
    public function test_getLibraryFileUrl() {
364
    public function test_getLibraryFileUrl(): void {
Línea 365... Línea 365...
365
        global $CFG;
365
        global $CFG;
Línea 366... Línea 366...
366
 
366
 
Línea 381... Línea 381...
381
 
381
 
382
    /**
382
    /**
383
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a non-existent library and
383
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a non-existent library and
384
     * the folder name is parsable.
384
     * the folder name is parsable.
385
     **/
385
     **/
386
    public function test_getLibraryFileUrl_non_existent_library() {
386
    public function test_getLibraryFileUrl_non_existent_library(): void {
Línea 387... Línea 387...
387
        $this->resetAfterTest();
387
        $this->resetAfterTest();
388
 
388
 
389
        $generator = $this->getDataGenerator()->get_plugin_generator('core_h5p');
389
        $generator = $this->getDataGenerator()->get_plugin_generator('core_h5p');
Línea 402... Línea 402...
402
 
402
 
403
    /**
403
    /**
404
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from an existing library and
404
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from an existing library and
405
     * the folder name is not parsable.
405
     * the folder name is not parsable.
406
     **/
406
     **/
407
    public function test_getLibraryFileUrl_not_parsable_folder_name() {
407
    public function test_getLibraryFileUrl_not_parsable_folder_name(): void {
Línea 408... Línea 408...
408
        $this->resetAfterTest();
408
        $this->resetAfterTest();
409
 
409
 
410
        $generator = $this->getDataGenerator()->get_plugin_generator('core_h5p');
410
        $generator = $this->getDataGenerator()->get_plugin_generator('core_h5p');
Línea 424... Línea 424...
424
 
424
 
425
    /**
425
    /**
426
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a library that has multiple
426
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a library that has multiple
427
     * versions and the folder name is parsable.
427
     * versions and the folder name is parsable.
428
     **/
428
     **/
429
    public function test_getLibraryFileUrl_library_has_multiple_versions() {
429
    public function test_getLibraryFileUrl_library_has_multiple_versions(): void {
Línea 430... Línea 430...
430
        global $CFG;
430
        global $CFG;
Línea 431... Línea 431...
431
 
431
 
Línea 447... Línea 447...
447
 
447
 
448
    /**
448
    /**
449
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a library that has multiple
449
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a library that has multiple
450
     * patch versions and the folder name is parsable.
450
     * patch versions and the folder name is parsable.
451
     **/
451
     **/
452
    public function test_getLibraryFileUrl_library_has_multiple_patch_versions() {
452
    public function test_getLibraryFileUrl_library_has_multiple_patch_versions(): void {
Línea 453... Línea 453...
453
        global $CFG;
453
        global $CFG;
Línea 454... Línea 454...
454
 
454
 
Línea 471... Línea 471...
471
 
471
 
472
    /**
472
    /**
473
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a sub-folder
473
     * Test the behaviour of getLibraryFileUrl() when requesting a file URL from a sub-folder
474
     * of an existing library and the folder name is parsable.
474
     * of an existing library and the folder name is parsable.
475
     **/
475
     **/
476
    public function test_getLibraryFileUrl_library_subfolder() {
476
    public function test_getLibraryFileUrl_library_subfolder(): void {
Línea 477... Línea 477...
477
        global $CFG;
477
        global $CFG;
Línea 478... Línea 478...
478
 
478
 
Línea 492... Línea 492...
492
    }
492
    }
Línea 493... Línea 493...
493
 
493
 
494
    /**
494
    /**
495
     * Test the behaviour of loadAddons().
495
     * Test the behaviour of loadAddons().
496
     */
496
     */
497
    public function test_loadAddons() {
497
    public function test_loadAddons(): void {
Línea 498... Línea 498...
498
        $this->resetAfterTest();
498
        $this->resetAfterTest();
Línea 499... Línea 499...
499
 
499
 
Línea 534... Línea 534...
534
    }
534
    }
Línea 535... Línea 535...
535
 
535
 
536
    /**
536
    /**
537
     * Test the behaviour of loadLibraries().
537
     * Test the behaviour of loadLibraries().
538
     */
538
     */
539
    public function test_loadLibraries() {
539
    public function test_loadLibraries(): void {
Línea 540... Línea 540...
540
        $this->resetAfterTest();
540
        $this->resetAfterTest();
Línea 541... Línea 541...
541
 
541
 
Línea 557... Línea 557...
557
    }
557
    }
Línea 558... Línea 558...
558
 
558
 
559
    /**
559
    /**
560
     * Test the behaviour of test_getLibraryId() when requesting an existing machine name.
560
     * Test the behaviour of test_getLibraryId() when requesting an existing machine name.
561
     */
561
     */
562
    public function test_getLibraryId_existing_machine_name() {
562
    public function test_getLibraryId_existing_machine_name(): void {
Línea 563... Línea 563...
563
        $this->resetAfterTest();
563
        $this->resetAfterTest();
Línea 564... Línea 564...
564
 
564
 
Línea 576... Línea 576...
576
    }
576
    }
Línea 577... Línea 577...
577
 
577
 
578
    /**
578
    /**
579
     * Test the behaviour of test_getLibraryId() when requesting a non-existent machine name.
579
     * Test the behaviour of test_getLibraryId() when requesting a non-existent machine name.
580
     */
580
     */
581
    public function test_getLibraryId_non_existent_machine_name() {
581
    public function test_getLibraryId_non_existent_machine_name(): void {
Línea 582... Línea 582...
582
        $this->resetAfterTest();
582
        $this->resetAfterTest();
Línea 583... Línea 583...
583
 
583
 
Línea 594... Línea 594...
594
    }
594
    }
Línea 595... Línea 595...
595
 
595
 
596
    /**
596
    /**
597
     * Test the behaviour of test_getLibraryId() when requesting a non-existent major version.
597
     * Test the behaviour of test_getLibraryId() when requesting a non-existent major version.
598
     */
598
     */
599
    public function test_getLibraryId_non_existent_major_version() {
599
    public function test_getLibraryId_non_existent_major_version(): void {
Línea 600... Línea 600...
600
        $this->resetAfterTest();
600
        $this->resetAfterTest();
Línea 601... Línea 601...
601
 
601
 
Línea 612... Línea 612...
612
    }
612
    }
Línea 613... Línea 613...
613
 
613
 
614
    /**
614
    /**
615
     * Test the behaviour of test_getLibraryId() when requesting a non-existent minor version.
615
     * Test the behaviour of test_getLibraryId() when requesting a non-existent minor version.
616
     */
616
     */
617
    public function test_getLibraryId_non_existent_minor_version() {
617
    public function test_getLibraryId_non_existent_minor_version(): void {
Línea 618... Línea 618...
618
        $this->resetAfterTest();
618
        $this->resetAfterTest();
Línea 619... Línea 619...
619
 
619
 
Línea 770... Línea 770...
770
    }
770
    }
Línea 771... Línea 771...
771
 
771
 
772
    /**
772
    /**
773
     * Test the behaviour of isInDevMode().
773
     * Test the behaviour of isInDevMode().
774
     */
774
     */
775
    public function test_isInDevMode() {
775
    public function test_isInDevMode(): void {
Línea 776... Línea 776...
776
        $isdevmode = $this->framework->isInDevMode();
776
        $isdevmode = $this->framework->isInDevMode();
777
 
777
 
Línea 885... Línea 885...
885
    }
885
    }
Línea 886... Línea 886...
886
 
886
 
887
    /**
887
    /**
888
     * Test the behaviour of saveLibraryData() when saving data for a new library.
888
     * Test the behaviour of saveLibraryData() when saving data for a new library.
889
     */
889
     */
890
    public function test_saveLibraryData_new_library() {
890
    public function test_saveLibraryData_new_library(): void {
Línea 891... Línea 891...
891
        global $DB;
891
        global $DB;
Línea 892... Línea 892...
892
 
892
 
Línea 936... Línea 936...
936
    }
936
    }
Línea 937... Línea 937...
937
 
937
 
938
    /**
938
    /**
939
     * Test the behaviour of saveLibraryData() when saving (updating) data for an existing library.
939
     * Test the behaviour of saveLibraryData() when saving (updating) data for an existing library.
940
     */
940
     */
941
    public function test_saveLibraryData_existing_library() {
941
    public function test_saveLibraryData_existing_library(): void {
Línea 942... Línea 942...
942
        global $DB;
942
        global $DB;
Línea 943... Línea 943...
943
 
943
 
Línea 993... Línea 993...
993
    }
993
    }
Línea 994... Línea 994...
994
 
994
 
995
    /**
995
    /**
996
     * Test the behaviour of insertContent().
996
     * Test the behaviour of insertContent().
997
     */
997
     */
998
    public function test_insertContent() {
998
    public function test_insertContent(): void {
Línea 999... Línea 999...
999
        global $DB;
999
        global $DB;
Línea 1000... Línea 1000...
1000
 
1000
 
Línea 1022... Línea 1022...
1022
    }
1022
    }
Línea 1023... Línea 1023...
1023
 
1023
 
1024
    /**
1024
    /**
1025
     * Test the behaviour of insertContent().
1025
     * Test the behaviour of insertContent().
1026
     */
1026
     */
1027
    public function test_insertContent_latestlibrary() {
1027
    public function test_insertContent_latestlibrary(): void {
Línea 1028... Línea 1028...
1028
        global $DB;
1028
        global $DB;
Línea 1029... Línea 1029...
1029
 
1029
 
Línea 1057... Línea 1057...
1057
    }
1057
    }
Línea 1058... Línea 1058...
1058
 
1058
 
1059
    /**
1059
    /**
1060
     * Test the behaviour of updateContent().
1060
     * Test the behaviour of updateContent().
1061
     */
1061
     */
1062
    public function test_updateContent() {
1062
    public function test_updateContent(): void {
Línea 1063... Línea 1063...
1063
        global $DB;
1063
        global $DB;
Línea 1064... Línea 1064...
1064
 
1064
 
Línea 1148... Línea 1148...
1148
    }
1148
    }
Línea 1149... Línea 1149...
1149
 
1149
 
1150
    /**
1150
    /**
1151
     * Test the behaviour of saveLibraryDependencies().
1151
     * Test the behaviour of saveLibraryDependencies().
1152
     */
1152
     */
1153
    public function test_saveLibraryDependencies() {
1153
    public function test_saveLibraryDependencies(): void {
Línea 1154... Línea 1154...
1154
        global $DB;
1154
        global $DB;
Línea 1155... Línea 1155...
1155
 
1155
 
Línea 1189... Línea 1189...
1189
    }
1189
    }
Línea 1190... Línea 1190...
1190
 
1190
 
1191
    /**
1191
    /**
1192
     * Test the behaviour of deleteContentData().
1192
     * Test the behaviour of deleteContentData().
1193
     */
1193
     */
1194
    public function test_deleteContentData() {
1194
    public function test_deleteContentData(): void {
Línea 1195... Línea 1195...
1195
        global $DB;
1195
        global $DB;
Línea 1196... Línea 1196...
1196
 
1196
 
Línea 1243... Línea 1243...
1243
    }
1243
    }
Línea 1244... Línea 1244...
1244
 
1244
 
1245
    /**
1245
    /**
1246
     * Test the behaviour of resetContentUserData().
1246
     * Test the behaviour of resetContentUserData().
1247
     */
1247
     */
1248
    public function test_resetContentUserData() {
1248
    public function test_resetContentUserData(): void {
Línea 1249... Línea 1249...
1249
        global $DB;
1249
        global $DB;
Línea 1250... Línea 1250...
1250
 
1250
 
Línea 1295... Línea 1295...
1295
    }
1295
    }
Línea 1296... Línea 1296...
1296
 
1296
 
1297
    /**
1297
    /**
1298
     * Test the behaviour of deleteLibraryUsage().
1298
     * Test the behaviour of deleteLibraryUsage().
1299
     */
1299
     */
1300
    public function test_deleteLibraryUsage() {
1300
    public function test_deleteLibraryUsage(): void {
Línea 1301... Línea 1301...
1301
        global $DB;
1301
        global $DB;
Línea 1302... Línea 1302...
1302
 
1302
 
Línea 1326... Línea 1326...
1326
    }
1326
    }
Línea 1327... Línea 1327...
1327
 
1327
 
1328
    /**
1328
    /**
1329
     * Test the behaviour of test_saveLibraryUsage().
1329
     * Test the behaviour of test_saveLibraryUsage().
1330
     */
1330
     */
1331
    public function test_saveLibraryUsage() {
1331
    public function test_saveLibraryUsage(): void {
Línea 1332... Línea 1332...
1332
        global $DB;
1332
        global $DB;
Línea 1333... Línea 1333...
1333
 
1333
 
Línea 1378... Línea 1378...
1378
    }
1378
    }
Línea 1379... Línea 1379...
1379
 
1379
 
1380
    /**
1380
    /**
1381
     * Test the behaviour of getLibraryUsage() without skipping a particular h5p content.
1381
     * Test the behaviour of getLibraryUsage() without skipping a particular h5p content.
1382
     */
1382
     */
1383
    public function test_getLibraryUsage_no_skip_content() {
1383
    public function test_getLibraryUsage_no_skip_content(): void {
Línea 1384... Línea 1384...
1384
        $this->resetAfterTest();
1384
        $this->resetAfterTest();
Línea 1385... Línea 1385...
1385
 
1385
 
Línea 1429... Línea 1429...
1429
    }
1429
    }
Línea 1430... Línea 1430...
1430
 
1430
 
1431
    /**
1431
    /**
1432
     * Test the behaviour of getLibraryUsage() when skipping a particular content.
1432
     * Test the behaviour of getLibraryUsage() when skipping a particular content.
1433
     */
1433
     */
1434
    public function test_getLibraryUsage_skip_content() {
1434
    public function test_getLibraryUsage_skip_content(): void {
Línea 1435... Línea 1435...
1435
        $this->resetAfterTest();
1435
        $this->resetAfterTest();
Línea 1436... Línea 1436...
1436
 
1436
 
Línea 1453... Línea 1453...
1453
    }
1453
    }
Línea 1454... Línea 1454...
1454
 
1454
 
1455
    /**
1455
    /**
1456
     * Test the behaviour of loadLibrary() when requesting an existing library.
1456
     * Test the behaviour of loadLibrary() when requesting an existing library.
1457
     */
1457
     */
1458
    public function test_loadLibrary_existing_library() {
1458
    public function test_loadLibrary_existing_library(): void {
Línea 1459... Línea 1459...
1459
        $this->resetAfterTest();
1459
        $this->resetAfterTest();
Línea 1460... Línea 1460...
1460
 
1460
 
Línea 1514... Línea 1514...
1514
    }
1514
    }
Línea 1515... Línea 1515...
1515
 
1515
 
1516
    /**
1516
    /**
1517
     * Test the behaviour of loadLibrary() when requesting a non-existent library.
1517
     * Test the behaviour of loadLibrary() when requesting a non-existent library.
1518
     */
1518
     */
1519
    public function test_loadLibrary_non_existent_library() {
1519
    public function test_loadLibrary_non_existent_library(): void {
Línea 1520... Línea 1520...
1520
        $this->resetAfterTest();
1520
        $this->resetAfterTest();
Línea 1521... Línea 1521...
1521
 
1521
 
Línea 1595... Línea 1595...
1595
    }
1595
    }
Línea 1596... Línea 1596...
1596
 
1596
 
1597
    /**
1597
    /**
1598
     * Test the behaviour of alterLibrarySemantics().
1598
     * Test the behaviour of alterLibrarySemantics().
1599
     */
1599
     */
1600
    public function test_alterLibrarySemantics() {
1600
    public function test_alterLibrarySemantics(): void {
Línea 1601... Línea 1601...
1601
        global $DB;
1601
        global $DB;
Línea 1602... Línea 1602...
1602
 
1602
 
Línea 1635... Línea 1635...
1635
 
1635
 
1636
    /**
1636
    /**
1637
     * Test the behaviour of deleteLibraryDependencies() when requesting to delete the
1637
     * Test the behaviour of deleteLibraryDependencies() when requesting to delete the
1638
     * dependencies of an existing library.
1638
     * dependencies of an existing library.
1639
     */
1639
     */
1640
    public function test_deleteLibraryDependencies_existing_library() {
1640
    public function test_deleteLibraryDependencies_existing_library(): void {
Línea 1641... Línea 1641...
1641
        global $DB;
1641
        global $DB;
Línea 1642... Línea 1642...
1642
 
1642
 
Línea 1664... Línea 1664...
1664
 
1664
 
1665
    /**
1665
    /**
1666
     * Test the behaviour of deleteLibraryDependencies() when requesting to delete the
1666
     * Test the behaviour of deleteLibraryDependencies() when requesting to delete the
1667
     * dependencies of a non-existent library.
1667
     * dependencies of a non-existent library.
1668
     */
1668
     */
1669
    public function test_deleteLibraryDependencies_non_existent_library() {
1669
    public function test_deleteLibraryDependencies_non_existent_library(): void {
Línea 1670... Línea 1670...
1670
        global $DB;
1670
        global $DB;
Línea 1671... Línea 1671...
1671
 
1671
 
Línea 1692... Línea 1692...
1692
    }
1692
    }
Línea 1693... Línea 1693...
1693
 
1693
 
1694
    /**
1694
    /**
1695
     * Test the behaviour of deleteLibrary().
1695
     * Test the behaviour of deleteLibrary().
1696
     */
1696
     */
1697
    public function test_deleteLibrary() {
1697
    public function test_deleteLibrary(): void {
Línea 1698... Línea 1698...
1698
        global $DB;
1698
        global $DB;
Línea 1699... Línea 1699...
1699
 
1699
 
Línea 1746... Línea 1746...
1746
    }
1746
    }
Línea 1747... Línea 1747...
1747
 
1747
 
1748
    /**
1748
    /**
1749
     * Test the behaviour of loadContent().
1749
     * Test the behaviour of loadContent().
1750
     */
1750
     */
1751
    public function test_loadContent() {
1751
    public function test_loadContent(): void {
Línea 1752... Línea 1752...
1752
        global $DB;
1752
        global $DB;
Línea 1753... Línea 1753...
1753
 
1753
 
Línea 1798... Línea 1798...
1798
 
1798
 
1799
    /**
1799
    /**
1800
     * Test the behaviour of loadContentDependencies() when requesting content dependencies
1800
     * Test the behaviour of loadContentDependencies() when requesting content dependencies
1801
     * without specifying the dependency type.
1801
     * without specifying the dependency type.
1802
     */
1802
     */
1803
    public function test_loadContentDependencies_no_type_defined() {
1803
    public function test_loadContentDependencies_no_type_defined(): void {
Línea 1804... Línea 1804...
1804
        $this->resetAfterTest();
1804
        $this->resetAfterTest();
Línea 1805... Línea 1805...
1805
 
1805
 
Línea 1857... Línea 1857...
1857
 
1857
 
1858
    /**
1858
    /**
1859
     * Test the behaviour of loadContentDependencies() when requesting content dependencies
1859
     * Test the behaviour of loadContentDependencies() when requesting content dependencies
1860
     * with specifying the dependency type.
1860
     * with specifying the dependency type.
1861
     */
1861
     */
1862
    public function test_loadContentDependencies_type_defined() {
1862
    public function test_loadContentDependencies_type_defined(): void {
Línea 1863... Línea 1863...
1863
        $this->resetAfterTest();
1863
        $this->resetAfterTest();
Línea 1864... Línea 1864...
1864
 
1864
 
Línea 1971... Línea 1971...
1971
    }
1971
    }
Línea 1972... Línea 1972...
1972
 
1972
 
1973
    /**
1973
    /**
1974
     * Test the behaviour of updateContentFields().
1974
     * Test the behaviour of updateContentFields().
1975
     */
1975
     */
1976
    public function test_updateContentFields() {
1976
    public function test_updateContentFields(): void {
Línea 1977... Línea 1977...
1977
        global $DB;
1977
        global $DB;
Línea 1978... Línea 1978...
1978
 
1978
 
Línea 2007... Línea 2007...
2007
    }
2007
    }
Línea 2008... Línea 2008...
2008
 
2008
 
2009
    /**
2009
    /**
2010
     * Test the behaviour of clearFilteredParameters().
2010
     * Test the behaviour of clearFilteredParameters().
2011
     */
2011
     */
2012
    public function test_clearFilteredParameters() {
2012
    public function test_clearFilteredParameters(): void {
Línea 2013... Línea 2013...
2013
        global $DB;
2013
        global $DB;
Línea 2014... Línea 2014...
2014
 
2014
 
Línea 2059... Línea 2059...
2059
    }
2059
    }
Línea 2060... Línea 2060...
2060
 
2060
 
2061
    /**
2061
    /**
2062
     * Test the behaviour of getNumNotFiltered().
2062
     * Test the behaviour of getNumNotFiltered().
2063
     */
2063
     */
2064
    public function test_getNumNotFiltered() {
2064
    public function test_getNumNotFiltered(): void {
Línea 2065... Línea 2065...
2065
        global $DB;
2065
        global $DB;
Línea 2066... Línea 2066...
2066
 
2066
 
Línea 2104... Línea 2104...
2104
    }
2104
    }
Línea 2105... Línea 2105...
2105
 
2105
 
2106
    /**
2106
    /**
2107
     * Test the behaviour of getNumContent().
2107
     * Test the behaviour of getNumContent().
2108
     */
2108
     */
2109
    public function test_getNumContent() {
2109
    public function test_getNumContent(): void {
Línea 2110... Línea 2110...
2110
        $this->resetAfterTest();
2110
        $this->resetAfterTest();
Línea 2111... Línea 2111...
2111
 
2111
 
Línea 2136... Línea 2136...
2136
    }
2136
    }
Línea 2137... Línea 2137...
2137
 
2137
 
2138
    /**
2138
    /**
2139
     * Test the behaviour of getNumContent() when certain contents are being skipped.
2139
     * Test the behaviour of getNumContent() when certain contents are being skipped.
2140
     */
2140
     */
2141
    public function test_getNumContent_skip_content() {
2141
    public function test_getNumContent_skip_content(): void {
Línea 2142... Línea 2142...
2142
        $this->resetAfterTest();
2142
        $this->resetAfterTest();
Línea 2143... Línea 2143...
2143
 
2143
 
Línea 2161... Línea 2161...
2161
    }
2161
    }
Línea 2162... Línea 2162...
2162
 
2162
 
2163
    /**
2163
    /**
2164
     * Test the behaviour of isContentSlugAvailable().
2164
     * Test the behaviour of isContentSlugAvailable().
2165
     */
2165
     */
2166
    public function test_isContentSlugAvailable() {
2166
    public function test_isContentSlugAvailable(): void {
Línea 2167... Línea 2167...
2167
        $this->resetAfterTest();
2167
        $this->resetAfterTest();
Línea 2168... Línea 2168...
2168
 
2168
 
Línea 2176... Línea 2176...
2176
    }
2176
    }
Línea 2177... Línea 2177...
2177
 
2177
 
2178
    /**
2178
    /**
2179
     * Test that a record is stored for cached assets.
2179
     * Test that a record is stored for cached assets.
2180
     */
2180
     */
2181
    public function test_saveCachedAssets() {
2181
    public function test_saveCachedAssets(): void {
Línea 2182... Línea 2182...
2182
        global $DB;
2182
        global $DB;
Línea 2183... Línea 2183...
2183
 
2183
 
Línea 2208... Línea 2208...
2208
    }
2208
    }
Línea 2209... Línea 2209...
2209
 
2209
 
2210
    /**
2210
    /**
2211
     * Test that the correct libraries are removed from the cached assets table
2211
     * Test that the correct libraries are removed from the cached assets table
2212
     */
2212
     */
2213
    public function test_deleteCachedAssets() {
2213
    public function test_deleteCachedAssets(): void {
Línea 2214... Línea 2214...
2214
        global $DB;
2214
        global $DB;
Línea 2215... Línea 2215...
2215
 
2215
 
Línea 2289... Línea 2289...
2289
    }
2289
    }
Línea 2290... Línea 2290...
2290
 
2290
 
2291
    /**
2291
    /**
2292
     * Test the behaviour of getLibraryContentCount().
2292
     * Test the behaviour of getLibraryContentCount().
2293
     */
2293
     */
2294
    public function test_getLibraryContentCount() {
2294
    public function test_getLibraryContentCount(): void {
Línea 2295... Línea 2295...
2295
        $this->resetAfterTest();
2295
        $this->resetAfterTest();
Línea 2296... Línea 2296...
2296
 
2296
 
Línea 2410... Línea 2410...
2410
 
2410
 
2411
 
2411
 
2412
    /**
2412
    /**
2413
     * Test the behaviour of get_latest_library_version().
2413
     * Test the behaviour of get_latest_library_version().
2414
     */
2414
     */
Línea 2415... Línea 2415...
2415
    public function test_get_latest_library_version() {
2415
    public function test_get_latest_library_version(): void {
Línea 2416... Línea 2416...
2416
        global $DB;
2416
        global $DB;