diff --git a/lib/dml/tests/dml_table_test.php b/lib/dml/tests/dml_table_test.php index 4d3cd8511e5..7ce85d344fe 100644 --- a/lib/dml/tests/dml_table_test.php +++ b/lib/dml/tests/dml_table_test.php @@ -33,7 +33,6 @@ use \core\dml\table; * @copyright 2019 Andrew Nicols * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \core\dml\table - * @covers :: */ class core_dml_table_testcase extends database_driver_testcase { diff --git a/lib/filestorage/tests/file_storage_test.php b/lib/filestorage/tests/file_storage_test.php index 30c15ad4181..20db7b7d015 100644 --- a/lib/filestorage/tests/file_storage_test.php +++ b/lib/filestorage/tests/file_storage_test.php @@ -43,7 +43,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Files can be created from strings. * * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string() { global $DB; @@ -117,7 +116,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Local files can be added to the filepool * * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname() { global $CFG, $DB; @@ -200,7 +198,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests get get file. * * @covers ::get_file - * @covers :: */ public function test_get_file() { global $CFG; @@ -241,7 +238,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @param stored_file $file * @depends test_get_file * @covers ::get_file_preview - * @covers :: */ public function test_get_file_preview(stored_file $file) { global $CFG; @@ -265,7 +261,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_file_preview without an image. * * @covers ::get_file_preview - * @covers :: */ public function test_get_file_preview_nonimage() { $this->resetAfterTest(true); @@ -293,7 +288,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org} * @covers stored_file::rename - * @covers :: */ public function test_file_renaming() { global $CFG; @@ -340,7 +334,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org} * @covers ::create_file_from_reference - * @covers :: */ public function test_create_file_from_reference() { global $CFG, $DB; @@ -427,7 +420,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * * @copyright 2012 Dongsheng Cai {@link http://dongsheng.org} * @covers ::create_file_from_reference - * @covers :: */ public function test_create_file_from_reference_with_content_hash() { global $CFG, $DB; @@ -537,7 +529,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_area_files * * @covers ::get_area_files - * @covers :: */ public function test_get_area_files() { $user = $this->setup_three_private_files(); @@ -598,7 +589,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_area_tree * * @covers ::get_area_tree - * @covers :: */ public function test_get_area_tree() { $user = $this->setup_three_private_files(); @@ -658,7 +648,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_file_by_id * * @covers ::get_file_by_id - * @covers :: */ public function test_get_file_by_id() { $user = $this->setup_three_private_files(); @@ -680,7 +669,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_file_by_hash * * @covers ::get_file_by_hash - * @covers :: */ public function test_get_file_by_hash() { $user = $this->setup_three_private_files(); @@ -701,7 +689,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_external_files * * @covers ::get_external_files - * @covers :: */ public function test_get_external_files() { $user = $this->setup_three_private_files(); @@ -768,7 +755,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with a negative contextid. * * @covers ::create_directory - * @covers :: */ public function test_create_directory_contextid_negative() { $fs = get_file_storage(); @@ -781,7 +767,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with an invalid contextid. * * @covers ::create_directory - * @covers :: */ public function test_create_directory_contextid_invalid() { $fs = get_file_storage(); @@ -794,7 +779,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with an invalid component. * * @covers ::create_directory - * @covers :: */ public function test_create_directory_component_invalid() { $fs = get_file_storage(); @@ -808,7 +792,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with an invalid filearea. * * @covers ::create_directory - * @covers :: */ public function test_create_directory_filearea_invalid() { $fs = get_file_storage(); @@ -822,7 +805,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with a negative itemid * * @covers ::create_directory - * @covers :: */ public function test_create_directory_itemid_negative() { $fs = get_file_storage(); @@ -836,7 +818,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with an invalid itemid * * @covers ::create_directory - * @covers :: */ public function test_create_directory_itemid_invalid() { $fs = get_file_storage(); @@ -850,7 +831,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_directory with an invalid filepath * * @covers ::create_directory - * @covers :: */ public function test_create_directory_filepath_invalid() { $fs = get_file_storage(); @@ -864,7 +844,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_directory_files. * * @covers ::get_directory_files - * @covers :: */ public function test_get_directory_files() { $user = $this->setup_three_private_files(); @@ -927,7 +906,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for search_references. * * @covers ::search_references - * @covers :: */ public function test_search_references() { $user = $this->setup_three_private_files(); @@ -1005,7 +983,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for delete_area_files. * * @covers ::delete_area_files - * @covers :: */ public function test_delete_area_files() { $user = $this->setup_three_private_files(); @@ -1026,7 +1003,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for delete_area_files using an itemid. * * @covers ::delete_area_files - * @covers :: */ public function test_delete_area_files_itemid() { $user = $this->setup_three_private_files(); @@ -1046,7 +1022,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for delete_area_files_select. * * @covers ::delete_area_files_select - * @covers :: */ public function test_delete_area_files_select() { $user = $this->setup_three_private_files(); @@ -1067,7 +1042,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for delete_component_files. * * @covers ::delete_component_files - * @covers :: */ public function test_delete_component_files() { $user = $this->setup_three_private_files(); @@ -1084,7 +1058,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_file_from_url. * * @covers ::create_file_from_url - * @covers :: */ public function test_create_file_from_url() { $this->resetAfterTest(true); @@ -1120,7 +1093,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for cron. * * @covers ::cron - * @covers :: */ public function test_cron() { $this->resetAfterTest(true); @@ -1137,7 +1109,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for is_area_empty. * * @covers ::is_area_empty - * @covers :: */ public function test_is_area_empty() { $user = $this->setup_three_private_files(); @@ -1155,7 +1126,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for move_area_files_to_new_context. * * @covers ::move_area_files_to_new_context - * @covers :: */ public function test_move_area_files_to_new_context() { $this->resetAfterTest(true); @@ -1210,7 +1180,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for convert_image. * * @covers ::convert_image - * @covers :: */ public function test_convert_image() { global $CFG; @@ -1244,7 +1213,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for convert_image with a PNG. * * @covers ::convert_image - * @covers :: */ public function test_convert_image_png() { global $CFG; @@ -1325,7 +1293,6 @@ class core_files_file_storage_testcase extends advanced_testcase { /** * @expectedException file_exception * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_file_invalid() { $this->resetAfterTest(true); @@ -1342,7 +1309,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid contextid * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_contextid_invalid() { $this->resetAfterTest(true); @@ -1363,7 +1329,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid component * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_component_invalid() { $this->resetAfterTest(true); @@ -1384,7 +1349,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid filearea * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_filearea_invalid() { $this->resetAfterTest(true); @@ -1405,7 +1369,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid itemid * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_itemid_invalid() { $this->resetAfterTest(true); @@ -1426,7 +1389,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file path * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_filepath_invalid() { $this->resetAfterTest(true); @@ -1447,7 +1409,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file name * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_filename_invalid() { $this->resetAfterTest(true); @@ -1467,7 +1428,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timecreated * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_timecreated_invalid() { $this->resetAfterTest(true); @@ -1488,7 +1448,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timemodified * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_timemodified_invalid() { $this->resetAfterTest(true); @@ -1509,7 +1468,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException stored_file_creation_exception * @expectedExceptionMessage Can not create file "1/core/phpunit/0/testfile.txt" * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile_duplicate() { $this->resetAfterTest(true); @@ -1528,7 +1486,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for create_file_from_storedfile. * * @covers ::create_file_from_storedfile - * @covers :: */ public function test_create_file_from_storedfile() { $this->resetAfterTest(true); @@ -1568,7 +1525,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid contextid * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_contextid_invalid() { $this->resetAfterTest(true); @@ -1585,7 +1541,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid component * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_component_invalid() { $this->resetAfterTest(true); @@ -1602,7 +1557,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid filearea * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_filearea_invalid() { $this->resetAfterTest(true); @@ -1619,7 +1573,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid itemid * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_itemid_invalid() { $this->resetAfterTest(true); @@ -1636,7 +1589,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file path * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_filepath_invalid() { $this->resetAfterTest(true); @@ -1653,7 +1605,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file name * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_filename_invalid() { $this->resetAfterTest(true); @@ -1670,7 +1621,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timecreated * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_timecreated_invalid() { $this->resetAfterTest(true); @@ -1689,7 +1639,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timemodified * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_timemodified_invalid() { $this->resetAfterTest(true); @@ -1705,7 +1654,6 @@ class core_files_file_storage_testcase extends advanced_testcase { /** * Tests for create_file_from_string with a duplicate string. * @covers ::create_file_from_string - * @covers :: */ public function test_create_file_from_string_duplicate() { $this->resetAfterTest(true); @@ -1724,7 +1672,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid contextid * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_contextid_invalid() { global $CFG; @@ -1744,7 +1691,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid component * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_component_invalid() { global $CFG; @@ -1764,7 +1710,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid filearea * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_filearea_invalid() { global $CFG; @@ -1784,7 +1729,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid itemid * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_itemid_invalid() { global $CFG; @@ -1804,7 +1748,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file path * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_filepath_invalid() { global $CFG; @@ -1824,7 +1767,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file name * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_filename_invalid() { global $CFG; @@ -1844,7 +1786,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timecreated * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_timecreated_invalid() { global $CFG; @@ -1864,7 +1805,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException file_exception * @expectedExceptionMessage Invalid file timemodified * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_timemodified_invalid() { global $CFG; @@ -1884,7 +1824,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * @expectedException stored_file_creation_exception * @expectedExceptionMessage Can not create file "1/core/phpunit/0/testfile.txt" * @covers ::create_file_from_pathname - * @covers :: */ public function test_create_file_from_pathname_duplicate_file() { global $CFG; @@ -1906,7 +1845,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Calling stored_file::delete_reference() on a non-reference file throws coding_exception * * @covers stored_file::delete_reference - * @covers :: */ public function test_delete_reference_on_nonreference() { @@ -1935,7 +1873,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * symlinks to the same original * * @covers stored_file::delete_reference - * @covers :: */ public function test_delete_reference_one_symlink_does_not_rule_them_all() { @@ -2105,7 +2042,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * Tests for get_unused_filename. * * @covers ::get_unused_filename - * @covers :: */ public function test_get_unused_filename() { global $USER; @@ -2174,7 +2110,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * file could not be found. * * @covers ::mimetype - * @covers :: */ public function test_mimetype_not_found() { $mimetype = file_storage::mimetype('/path/to/nonexistent/file'); @@ -2190,7 +2125,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * errors and behaves as expected. * * @covers ::mimetype - * @covers :: */ public function test_mimetype_known() { $filepath = __DIR__ . '/fixtures/testimage.jpg'; @@ -2203,7 +2137,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * file could not be found. * * @covers ::mimetype - * @covers :: */ public function test_mimetype_from_file_not_found() { $mimetype = file_storage::mimetype_from_file('/path/to/nonexistent/file'); @@ -2219,7 +2152,6 @@ class core_files_file_storage_testcase extends advanced_testcase { * errors and behaves as expected. * * @covers ::mimetype - * @covers :: */ public function test_mimetype_from_file_known() { $filepath = __DIR__ . '/fixtures/testimage.jpg'; diff --git a/lib/filestorage/tests/file_system_filedir_test.php b/lib/filestorage/tests/file_system_filedir_test.php index 14421a09a07..525d7706ae2 100644 --- a/lib/filestorage/tests/file_system_filedir_test.php +++ b/lib/filestorage/tests/file_system_filedir_test.php @@ -140,7 +140,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * is not writable. * * @covers ::__construct - * @covers :: */ public function test_readonly_filesystem_filedir() { $this->resetAfterTest(); @@ -165,7 +164,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * is not writable. * * @covers ::__construct - * @covers :: */ public function test_readonly_filesystem_trashdir() { $this->resetAfterTest(); @@ -189,7 +187,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Test that the standard Moodle warning message is put into the filedir. * * @covers ::__construct - * @covers :: */ public function test_warnings_put_in_place() { $this->resetAfterTest(); @@ -210,7 +207,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * simply calls get_local_path_from_hash. * * @covers ::get_remote_path_from_hash - * @covers :: */ public function test_get_remote_path_from_hash() { $filecontent = 'example content'; @@ -238,7 +234,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * a failed recovery. * * @covers ::get_local_path_from_storedfile - * @covers :: */ public function test_get_local_path_from_storedfile_with_recovery() { $filecontent = 'example content'; @@ -267,7 +262,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * a failed recovery. * * @covers ::get_local_path_from_storedfile - * @covers :: */ public function test_get_local_path_from_storedfile_without_recovery() { $filecontent = 'example content'; @@ -299,7 +293,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_fulldir_from_hash - * @covers :: */ public function test_get_fulldir_from_hash($hash, $hashdir) { global $CFG; @@ -322,7 +315,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_fulldir_from_storedfile - * @covers :: */ public function test_get_fulldir_from_storedfile($hash, $hashdir) { global $CFG; @@ -355,7 +347,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_contentdir_from_hash - * @covers :: */ public function test_get_contentdir_from_hash($hash, $hashdir) { $method = new ReflectionMethod(file_system_filedir::class, 'get_contentdir_from_hash'); @@ -376,7 +367,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_contentpath_from_hash - * @covers :: */ public function test_get_contentpath_from_hash($hash, $hashdir) { $method = new ReflectionMethod(file_system_filedir::class, 'get_contentpath_from_hash'); @@ -398,7 +388,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_trash_fullpath_from_hash - * @covers :: */ public function test_get_trash_fullpath_from_hash($hash, $hashdir) { global $CFG; @@ -421,7 +410,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * @param string $hashdir Expected format of content directory * * @covers ::get_trash_fulldir_from_hash - * @covers :: */ public function test_get_trash_fulldir_from_hash($hash, $hashdir) { global $CFG; @@ -439,7 +427,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that copying a file to a target from a stored_file works as anticipated. * * @covers ::copy_content_from_storedfile - * @covers :: */ public function test_copy_content_from_storedfile() { $this->resetAfterTest(); @@ -478,7 +465,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that content recovery works. * * @covers ::recover_file - * @covers :: */ public function test_recover_file() { $this->resetAfterTest(); @@ -519,7 +505,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that content recovery works. * * @covers ::recover_file - * @covers :: */ public function test_recover_file_already_present() { $this->resetAfterTest(); @@ -559,7 +544,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that content recovery works. * * @covers ::recover_file - * @covers :: */ public function test_recover_file_size_mismatch() { $this->resetAfterTest(); @@ -597,7 +581,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that content recovery works. * * @covers ::recover_file - * @covers :: */ public function test_recover_file_has_mismatch() { $this->resetAfterTest(); @@ -636,7 +619,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * alt trash directory. * * @covers ::recover_file - * @covers :: */ public function test_recover_file_alttrash() { $this->resetAfterTest(); @@ -672,7 +654,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * file to the pool when the pool directory structure is not writable. * * @covers ::recover_file - * @covers :: */ public function test_recover_file_contentdir_readonly() { $this->resetAfterTest(); @@ -710,7 +691,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Test adding a file to the pool. * * @covers ::add_file_from_path - * @covers :: */ public function test_add_file_from_path() { $this->resetAfterTest(); @@ -747,7 +727,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * unavailable file to the pool is attempted. * * @covers ::add_file_from_path - * @covers :: */ public function test_add_file_from_path_file_unavailable() { $this->resetAfterTest(); @@ -768,7 +747,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * the wrong contenthash when adding a file to the pool. * * @covers ::add_file_from_path - * @covers :: */ public function test_add_file_from_path_mismatched_hash() { $this->resetAfterTest(); @@ -791,7 +769,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * file in the pool has the wrong contenthash * * @covers ::add_file_from_path - * @covers :: */ public function test_add_file_from_path_existing_content_invalid() { $this->resetAfterTest(); @@ -837,7 +814,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * file to the pool when the pool directory structure is not writable. * * @covers ::add_file_from_path - * @covers :: */ public function test_add_file_from_path_existing_cannot_write_hashpath() { $this->resetAfterTest(); @@ -871,7 +847,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Test adding a string to the pool. * * @covers ::add_file_from_string - * @covers :: */ public function test_add_file_from_string() { $this->resetAfterTest(); @@ -899,7 +874,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * string to the pool when the pool directory structure is not writable. * * @covers ::add_file_from_string - * @covers :: */ public function test_add_file_from_string_existing_cannot_write_hashpath() { $this->resetAfterTest(); @@ -931,7 +905,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * contenthash is already present. * * @covers ::add_file_from_string - * @covers :: */ public function test_add_file_from_string_existing_matches() { $this->resetAfterTest(); @@ -966,7 +939,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Test the cleanup of deleted files when there are no files to delete. * * @covers ::remove_file - * @covers :: */ public function test_remove_file_missing() { $this->resetAfterTest(); @@ -990,7 +962,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * trash for that path. * * @covers ::remove_file - * @covers :: */ public function test_remove_file_existing_trash() { $this->resetAfterTest(); @@ -1020,7 +991,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Ensure that remove_file does nothing with an empty file. * * @covers ::remove_file - * @covers :: */ public function test_remove_file_empty() { $this->resetAfterTest(); @@ -1044,7 +1014,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * in use. * * @covers ::remove_file - * @covers :: */ public function test_remove_file_in_use() { $this->resetAfterTest(); @@ -1078,7 +1047,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * longer in use. * * @covers ::remove_file - * @covers :: */ public function test_remove_file_expired() { $this->resetAfterTest(); @@ -1111,7 +1079,6 @@ class core_files_file_system_filedir_testcase extends advanced_testcase { * Test purging the cache. * * @covers ::empty_trash - * @covers :: */ public function test_empty_trash() { $this->resetAfterTest(); diff --git a/lib/filestorage/tests/file_system_test.php b/lib/filestorage/tests/file_system_test.php index 8508a677b27..387d047aecd 100644 --- a/lib/filestorage/tests/file_system_test.php +++ b/lib/filestorage/tests/file_system_test.php @@ -109,7 +109,6 @@ class core_files_file_system_testcase extends advanced_testcase { /** * Ensure that the file system is not clonable. * - * @covers :: */ public function test_not_cloneable() { $reflection = new ReflectionClass('file_system'); @@ -119,7 +118,6 @@ class core_files_file_system_testcase extends advanced_testcase { /** * Ensure that the filedir file_system extension is used by default. * - * @covers :: */ public function test_default_class() { $this->resetAfterTest(); @@ -137,7 +135,6 @@ class core_files_file_system_testcase extends advanced_testcase { /** * Ensure that the specified file_system extension class is used. * - * @covers :: */ public function test_supplied_class() { global $CFG; @@ -160,7 +157,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test that the readfile function outputs content to disk. * * @covers ::readfile - * @covers :: */ public function test_readfile_remote() { global $CFG; @@ -194,7 +190,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test that the readfile function outputs content to disk. * * @covers ::readfile - * @covers :: */ public function test_readfile_local() { global $CFG; @@ -233,7 +228,6 @@ class core_files_file_system_testcase extends advanced_testcase { * @param bool $fetch Whether the combination of args should have caused a fetch * * @covers ::get_local_path_from_storedfile - * @covers :: */ public function test_get_local_path_from_storedfile($args, $fetch) { $filepath = '/path/to/file'; @@ -261,7 +255,6 @@ class core_files_file_system_testcase extends advanced_testcase { * fetch. * * @covers ::get_remote_path_from_storedfile - * @covers :: */ public function test_get_remote_path_from_storedfile() { $filepath = '/path/to/file'; @@ -292,7 +285,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Fetching the file is optional. * * @covers ::is_file_readable_locally_by_hash - * @covers :: */ public function test_is_file_readable_locally_by_hash() { $filecontent = 'example content'; @@ -314,7 +306,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_locally_by_hash with an empty file. * * @covers ::is_file_readable_locally_by_hash - * @covers :: */ public function test_is_file_readable_locally_by_hash_empty() { $filecontent = ''; @@ -334,7 +325,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_remotely_by_hash - * @covers :: */ public function test_is_file_readable_remotely_by_hash() { $filecontent = 'example content'; @@ -355,7 +345,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_remotely_by_hash - * @covers :: */ public function test_is_file_readable_remotely_by_hash_empty() { $filecontent = ''; @@ -375,7 +364,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_remotely_by_hash - * @covers :: */ public function test_is_file_readable_remotely_by_hash_not_found() { $filecontent = 'example content'; @@ -396,7 +384,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_remotely_by_storedfile - * @covers :: */ public function test_is_file_readable_remotely_by_storedfile() { $file = $this->get_stored_file('example content'); @@ -415,7 +402,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_remotely_by_storedfile - * @covers :: */ public function test_is_file_readable_remotely_by_storedfile_empty() { $fs = $this->get_testable_mock([ @@ -433,7 +419,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_locally_by_storedfile with an empty file. * * @covers ::is_file_readable_locally_by_storedfile - * @covers :: */ public function test_is_file_readable_locally_by_storedfile_empty() { $fs = $this->get_testable_mock([ @@ -451,7 +436,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_remotely_by_storedfile with a valid file. * * @covers ::is_file_readable_locally_by_storedfile - * @covers :: */ public function test_is_file_readable_remotely_by_storedfile_not_found() { $file = $this->get_stored_file('example content'); @@ -470,7 +454,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_locally_by_storedfile with a valid file. * * @covers ::is_file_readable_locally_by_storedfile - * @covers :: */ public function test_is_file_readable_locally_by_storedfile_unreadable() { $fs = $this->get_testable_mock([ @@ -489,7 +472,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of is_file_readable_locally_by_storedfile with a valid file should pass fetch. * * @covers ::is_file_readable_locally_by_storedfile - * @covers :: */ public function test_is_file_readable_locally_by_storedfile_passes_fetch() { $fs = $this->get_testable_mock([ @@ -508,7 +490,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that is_file_removable returns correctly for an empty file. * * @covers ::is_file_removable - * @covers :: */ public function test_is_file_removable_empty() { $filecontent = ''; @@ -524,7 +505,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that is_file_removable returns false if the file is still in use. * * @covers ::is_file_removable - * @covers :: */ public function test_is_file_removable_in_use() { $this->resetAfterTest(); @@ -549,7 +529,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that is_file_removable returns false if the file is not in use. * * @covers ::is_file_removable - * @covers :: */ public function test_is_file_removable_not_in_use() { $this->resetAfterTest(); @@ -574,7 +553,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of get_content. * * @covers ::get_content - * @covers :: */ public function test_get_content() { global $CFG; @@ -600,7 +578,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Test the stock implementation of get_content. * * @covers ::get_content - * @covers :: */ public function test_get_content_empty() { global $CFG; @@ -624,7 +601,6 @@ class core_files_file_system_testcase extends advanced_testcase { * file, and passes the path to the packer. * * @covers ::list_files - * @covers :: */ public function test_list_files() { $filecontent = 'example content'; @@ -657,7 +633,6 @@ class core_files_file_system_testcase extends advanced_testcase { * file, and passes the path to the packer. * * @covers ::extract_to_pathname - * @covers :: */ public function test_extract_to_pathname() { $filecontent = 'example content'; @@ -691,7 +666,6 @@ class core_files_file_system_testcase extends advanced_testcase { * file, and passes the path to the packer. * * @covers ::extract_to_storage - * @covers :: */ public function test_extract_to_storage() { $filecontent = 'example content'; @@ -733,7 +707,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that the add_storedfile_to_archive function requires a local copy of the * file, and passes the path to the archive. * - * @covers :: */ public function test_add_storedfile_to_archive_directory() { $file = $this->get_stored_file('', '.'); @@ -770,7 +743,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that the add_storedfile_to_archive function requires a local copy of the * file, and passes the path to the archive. * - * @covers :: */ public function test_add_storedfile_to_archive_file() { $file = $this->get_stored_file('example content'); @@ -812,7 +784,6 @@ class core_files_file_system_testcase extends advanced_testcase { * file, and passes the path to curl_file_create. * * @covers ::add_to_curl_request - * @covers :: */ public function test_add_to_curl_request() { $file = $this->get_stored_file('example content'); @@ -837,7 +808,6 @@ class core_files_file_system_testcase extends advanced_testcase { * passed was deemed to not be an image. * * @covers ::get_imageinfo - * @covers :: */ public function test_get_imageinfo_not_image() { $filecontent = 'example content'; @@ -859,7 +829,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that test_get_imageinfo_not_image returns imageinfo. * * @covers ::get_imageinfo - * @covers :: */ public function test_get_imageinfo() { $filepath = '/path/to/file'; @@ -896,7 +865,6 @@ class core_files_file_system_testcase extends advanced_testcase { * empty file size. * * @covers ::is_image_from_storedfile - * @covers :: */ public function test_is_image_empty_filesize() { $filecontent = 'example content'; @@ -918,7 +886,6 @@ class core_files_file_system_testcase extends advanced_testcase { * @param string $mimetype Mimetype to test * @param bool $isimage Whether this mimetype should be detected as an image * @covers ::is_image_from_storedfile - * @covers :: */ public function test_is_image_from_storedfile_mimetype($mimetype, $isimage) { $filecontent = 'example content'; @@ -937,7 +904,6 @@ class core_files_file_system_testcase extends advanced_testcase { * for an image. * * @covers ::get_imageinfo_from_path - * @covers :: */ public function test_get_imageinfo_from_path() { $filepath = __DIR__ . "/fixtures/testimage.jpg"; @@ -960,7 +926,6 @@ class core_files_file_system_testcase extends advanced_testcase { * for a file which is not an image. * * @covers ::get_imageinfo_from_path - * @covers :: */ public function test_get_imageinfo_from_path_no_image() { $filepath = __FILE__; @@ -979,7 +944,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that get_content_file_handle returns a valid file handle. * * @covers ::get_content_file_handle - * @covers :: */ public function test_get_content_file_handle_default() { $filecontent = 'example content'; @@ -1000,7 +964,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that get_content_file_handle returns a valid file handle for a gz file. * * @covers ::get_content_file_handle - * @covers :: */ public function test_get_content_file_handle_gz() { $filecontent = 'example content'; @@ -1020,7 +983,6 @@ class core_files_file_system_testcase extends advanced_testcase { * Ensure that get_content_file_handle returns an exception when calling for a invalid file handle type. * * @covers ::get_content_file_handle - * @covers :: */ public function test_get_content_file_handle_invalid() { $filecontent = 'example content'; @@ -1039,7 +1001,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a file whose filename suggests mimetype. * * @covers ::mimetype_from_hash - * @covers :: */ public function test_mimetype_from_hash_using_filename() { $filepath = '/path/to/file/not/currently/on/disk'; @@ -1059,7 +1020,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a locally available file whose filename does not suggest mimetype. * * @covers ::mimetype_from_hash - * @covers :: */ public function test_mimetype_from_hash_using_file_content() { $filecontent = 'example content'; @@ -1079,7 +1039,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a remotely available file whose filename does not suggest mimetype. * * @covers ::mimetype_from_hash - * @covers :: */ public function test_mimetype_from_hash_using_file_content_remote() { $filepath = '/path/to/file/not/currently/on/disk'; @@ -1108,7 +1067,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a file whose filename suggests mimetype. * * @covers ::mimetype_from_storedfile - * @covers :: */ public function test_mimetype_from_storedfile_empty() { $file = $this->get_stored_file(''); @@ -1123,7 +1081,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a file whose filename suggests mimetype. * * @covers ::mimetype_from_storedfile - * @covers :: */ public function test_mimetype_from_storedfile_using_filename() { $filepath = '/path/to/file/not/currently/on/disk'; @@ -1141,7 +1098,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a locally available file whose filename does not suggest mimetype. * * @covers ::mimetype_from_storedfile - * @covers :: */ public function test_mimetype_from_storedfile_using_file_content() { $filepath = __DIR__ . "/fixtures/testimage.jpg"; @@ -1159,7 +1115,6 @@ class core_files_file_system_testcase extends advanced_testcase { * a remotely available file whose filename does not suggest mimetype. * * @covers ::mimetype_from_storedfile - * @covers :: */ public function test_mimetype_from_storedfile_using_file_content_remote() { $filepath = __DIR__ . "/fixtures/testimage.jpg"; @@ -1212,3 +1167,4 @@ class core_files_file_system_testcase extends advanced_testcase { ]; } } + diff --git a/mod/forum/tests/managers_capability_test.php b/mod/forum/tests/managers_capability_test.php index 2f8309db8fe..cd7d66cc707 100644 --- a/mod/forum/tests/managers_capability_test.php +++ b/mod/forum/tests/managers_capability_test.php @@ -36,7 +36,6 @@ use mod_forum\local\managers\capability as capability_manager; * @copyright 2019 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later * @coversDefaultClass \mod_forum\local\managers\capability - * @covers :: */ class mod_forum_managers_capability_testcase extends advanced_testcase { // Make use of the test generator trait. diff --git a/mod/forum/tests/vaults_forum_test.php b/mod/forum/tests/vaults_forum_test.php index 3cb4a5bf760..fbf72c77e1a 100644 --- a/mod/forum/tests/vaults_forum_test.php +++ b/mod/forum/tests/vaults_forum_test.php @@ -42,7 +42,6 @@ class mod_forum_vaults_forum_testcase extends advanced_testcase { * Test get_from_id. * * @covers ::get_from_id - * @covers :: */ public function test_get_from_id() { $this->resetAfterTest(); @@ -63,7 +62,6 @@ class mod_forum_vaults_forum_testcase extends advanced_testcase { * Test get_from_course_module_id. * * @covers ::get_from_course_module_id - * @covers :: */ public function test_get_from_course_module_id() { $this->resetAfterTest(); @@ -90,7 +88,6 @@ class mod_forum_vaults_forum_testcase extends advanced_testcase { * Test get_from_course_module_ids. * * @covers ::get_from_course_module_ids - * @covers :: */ public function test_get_from_course_module_ids() { $this->resetAfterTest(); @@ -129,7 +126,6 @@ class mod_forum_vaults_forum_testcase extends advanced_testcase { * Test get_from_post_id. * * @covers ::get_from_post_id - * @covers :: */ public function test_get_from_post_id() { $this->resetAfterTest(); diff --git a/mod/forum/tests/vaults_post_test.php b/mod/forum/tests/vaults_post_test.php index 92d399ac877..6e607b9cddf 100644 --- a/mod/forum/tests/vaults_post_test.php +++ b/mod/forum/tests/vaults_post_test.php @@ -77,7 +77,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_from_discussion_id. * * @covers ::get_from_discussion_id - * @covers :: */ public function test_get_from_discussion_id() { $this->resetAfterTest(); @@ -107,7 +106,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * replies. * * @covers ::get_from_discussion_id - * @covers :: */ public function test_get_from_discussion_id_private_replies() { $this->resetAfterTest(); @@ -168,7 +166,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_from_discussion_ids. * * @covers ::get_from_discussion_ids - * @covers :: */ public function test_get_from_discussion_ids() { $this->resetAfterTest(); @@ -215,7 +212,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * replies. * * @covers ::get_from_discussion_ids - * @covers :: */ public function test_get_from_discussion_ids_private_replies() { $this->resetAfterTest(); @@ -312,7 +308,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_replies_to_post. * * @covers ::get_replies_to_post - * @covers :: */ public function test_get_replies_to_post() { $this->resetAfterTest(); @@ -361,7 +356,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_replies_to_post with private replies. * * @covers ::get_replies_to_post - * @covers :: */ public function test_get_replies_to_post_private_replies() { $this->resetAfterTest(); @@ -538,7 +532,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_reply_count_for_discussion_ids. * * @covers ::get_reply_count_for_discussion_ids - * @covers :: */ public function test_get_reply_count_for_discussion_ids() { $this->resetAfterTest(); @@ -588,7 +581,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_reply_count_for_discussion_ids. * * @covers ::get_reply_count_for_discussion_ids - * @covers :: */ public function test_get_reply_count_for_discussion_ids_private_replies() { $this->resetAfterTest(); @@ -639,7 +631,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_reply_count_for_discussion_id. * * @covers ::get_reply_count_for_post_id_in_discussion_id - * @covers :: */ public function test_get_reply_count_for_post_id_in_discussion_id() { $this->resetAfterTest(); @@ -670,7 +661,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_reply_count_for_post_id_in_discussion_id. * * @covers ::get_reply_count_for_post_id_in_discussion_id - * @covers :: */ public function test_get_reply_count_for_post_id_in_discussion_id_private_replies() { $this->resetAfterTest(); @@ -721,7 +711,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_unread_count_for_discussion_ids. * * @covers ::get_unread_count_for_discussion_ids - * @covers :: */ public function test_get_unread_count_for_discussion_ids() { global $CFG; @@ -798,7 +787,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_latest_posts_for_discussion_ids. * * @covers ::get_latest_posts_for_discussion_ids - * @covers :: */ public function test_get_latest_posts_for_discussion_ids() { $this->resetAfterTest(); @@ -861,7 +849,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_latest_posts_for_discussion_ids when no discussion ids were provided. * * @covers ::get_latest_posts_for_discussion_ids - * @covers :: */ public function test_get_latest_posts_for_discussion_ids_empty() { $this->resetAfterTest(); @@ -878,7 +865,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_first_post_for_discussion_ids. * * @covers ::get_first_post_for_discussion_ids - * @covers :: */ public function test_get_first_post_for_discussion_ids() { $this->resetAfterTest(); @@ -926,7 +912,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_first_post_for_discussion_ids when no discussion ids were provided. * * @covers ::get_first_post_for_discussion_ids - * @covers :: */ public function test_get_first_post_for_discussion_ids_empty() { $this->resetAfterTest(); @@ -943,7 +928,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * Test get_from_discussion_ids_and_user_ids. * * @covers ::get_from_discussion_ids_and_user_ids - * @covers :: */ public function test_get_from_discussion_ids_and_user_ids() { $this->resetAfterTest(); @@ -1027,7 +1011,6 @@ class mod_forum_vaults_post_testcase extends advanced_testcase { * replies. * * @covers ::get_from_discussion_ids_and_user_ids - * @covers :: */ public function test_get_from_discussion_ids_and_user_ids_private_replies() { $this->resetAfterTest(); diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 2361ad61629..4c262dd6e86 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -9,7 +9,6 @@ processIsolation="false" backupGlobals="false" backupStaticAttributes="false" - forceCoversAnnotation="true" stopOnError="false" stopOnFailure="false" stopOnIncomplete="false" diff --git a/privacy/tests/approved_contextlist_test.php b/privacy/tests/approved_contextlist_test.php index 45f6ad5c789..a5057f0232d 100644 --- a/privacy/tests/approved_contextlist_test.php +++ b/privacy/tests/approved_contextlist_test.php @@ -42,7 +42,6 @@ class approved_contextlist_test extends advanced_testcase { * The approved contextlist should not be modifiable once set. * * @covers ::__construct - * @covers :: * @covers \core_privacy\local\request\approved_contextlist */ public function test_default_values_set() { diff --git a/privacy/tests/approved_userlist_test.php b/privacy/tests/approved_userlist_test.php index 3be87c74e27..f78e4414507 100644 --- a/privacy/tests/approved_userlist_test.php +++ b/privacy/tests/approved_userlist_test.php @@ -43,7 +43,6 @@ class approved_userlist_test extends advanced_testcase { * * @covers ::__construct * @covers \core_privacy\local\request\approved_userlist - * @covers :: */ public function test_default_values_set() { $this->resetAfterTest(); @@ -76,7 +75,6 @@ class approved_userlist_test extends advanced_testcase { /** * @covers ::create_from_userlist * @covers \core_privacy\local\request\approved_userlist - * @covers :: */ public function test_create_from_userlist() { $this->resetAfterTest(); diff --git a/privacy/tests/collection_test.php b/privacy/tests/collection_test.php index b7403f7e1ce..069867042c3 100644 --- a/privacy/tests/collection_test.php +++ b/privacy/tests/collection_test.php @@ -43,7 +43,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that adding an unknown type causes the type to be added to the collection. * * @covers ::add_type - * @covers :: */ public function test_add_type_generic_type() { $collection = new collection('core_privacy'); @@ -61,7 +60,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that adding a known type works as anticipated. * * @covers ::add_type - * @covers :: */ public function test_add_type_known_type() { $collection = new collection('core_privacy'); @@ -78,7 +76,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that adding multiple types returns them all. * * @covers ::add_type - * @covers :: */ public function test_add_type_multiple() { $collection = new collection('core_privacy'); @@ -97,7 +94,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that the add_database_table function adds a database table. * * @covers ::add_database_table - * @covers :: */ public function test_add_database_table() { $collection = new collection('core_privacy'); @@ -121,7 +117,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that the add_user_preference function adds a single user preference. * * @covers ::add_user_preference - * @covers :: */ public function test_add_user_preference() { $collection = new collection('core_privacy'); @@ -143,7 +138,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that the link_external_location function links an external location. * * @covers ::link_external_location - * @covers :: */ public function test_link_external_location() { $collection = new collection('core_privacy'); @@ -167,7 +161,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that the link_subsystem function links the subsystem. * * @covers ::link_subsystem - * @covers :: */ public function test_link_subsystem() { $collection = new collection('core_privacy'); @@ -189,7 +182,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * Test that the link_plugintype function links the plugin. * * @covers ::link_plugintype - * @covers :: */ public function test_link_plugintype() { $collection = new collection('core_privacy'); @@ -227,7 +219,6 @@ class core_privacy_metadata_collection extends advanced_testcase { * @dataProvider component_list_provider * @param string $component The component to test * @covers ::get_component - * @covers :: */ public function test_get_component($component) { $collection = new collection($component); diff --git a/privacy/tests/contextlist_base_test.php b/privacy/tests/contextlist_base_test.php index 742ec33b818..851710e5533 100644 --- a/privacy/tests/contextlist_base_test.php +++ b/privacy/tests/contextlist_base_test.php @@ -45,7 +45,6 @@ class contextlist_base_test extends advanced_testcase { * @param array $expected list of contextids * @param int $count Expected count * @covers ::get_contextids - * @covers :: */ public function test_get_contextids($input, $expected, $count) { $uit = new test_contextlist_base(); @@ -89,7 +88,6 @@ class contextlist_base_test extends advanced_testcase { * Ensure that get_contexts returns the correct list of contexts. * * @covers ::get_contexts - * @covers :: */ public function test_get_contexts() { global $DB; @@ -121,7 +119,6 @@ class contextlist_base_test extends advanced_testcase { * @param array $expected list of contextids * @param int $count Expected count * @covers ::count - * @covers :: */ public function test_countable($input, $expected, $count) { $uit = new test_contextlist_base(); @@ -138,7 +135,6 @@ class contextlist_base_test extends advanced_testcase { * @covers ::next * @covers ::rewind * @covers ::valid - * @covers :: */ public function test_context_iteration() { global $DB; @@ -161,7 +157,6 @@ class contextlist_base_test extends advanced_testcase { * Test that deleting a context results in current returning nothing. * * @covers ::current - * @covers :: */ public function test_current_context_one_context() { global $DB; @@ -191,7 +186,6 @@ class contextlist_base_test extends advanced_testcase { * Test that deleting a context results in the next record being returned. * * @covers ::current - * @covers :: */ public function test_current_context_two_contexts() { global $DB; @@ -229,7 +223,6 @@ class contextlist_base_test extends advanced_testcase { * Test that if there are no non-deleted contexts that nothing is returned. * * @covers ::get_contexts - * @covers :: */ public function test_get_contexts_all_deleted() { global $DB; @@ -257,7 +250,6 @@ class contextlist_base_test extends advanced_testcase { * Test that get_contexts() returns only active contexts. * * @covers ::get_contexts - * @covers :: */ public function test_get_contexts_one_deleted() { global $DB; diff --git a/privacy/tests/contextlist_collection_test.php b/privacy/tests/contextlist_collection_test.php index 2eaf5daa5d5..2d75eb8f360 100644 --- a/privacy/tests/contextlist_collection_test.php +++ b/privacy/tests/contextlist_collection_test.php @@ -43,7 +43,6 @@ class contextlist_collection_test extends advanced_testcase { * A contextlist_collection should support the contextlist type. * * @covers ::add_contextlist - * @covers :: */ public function test_supports_contextlist() { $uit = new contextlist_collection(1); @@ -58,7 +57,6 @@ class contextlist_collection_test extends advanced_testcase { * A contextlist_collection should support the approved_contextlist type. * * @covers ::add_contextlist - * @covers :: */ public function test_supports_approved_contextlist() { $uit = new contextlist_collection(1); @@ -73,7 +71,6 @@ class contextlist_collection_test extends advanced_testcase { * Ensure that get_contextlist_for_component returns the correct contextlist. * * @covers ::get_contextlist_for_component - * @covers :: */ public function test_get_contextlist_for_component() { $uit = new contextlist_collection(1); @@ -95,7 +92,6 @@ class contextlist_collection_test extends advanced_testcase { * Ensure that get_contextlist_for_component does not die horribly when querying a non-existent component. * * @covers ::get_contextlist_for_component - * @covers :: */ public function test_get_contextlist_for_component_not_found() { $uit = new contextlist_collection(1); @@ -107,7 +103,6 @@ class contextlist_collection_test extends advanced_testcase { * Ensure that a duplicate contextlist in the collection throws an Exception. * * @covers ::add_contextlist - * @covers :: */ public function test_duplicate_addition_throws() { $uit = new contextlist_collection(1); @@ -124,7 +119,6 @@ class contextlist_collection_test extends advanced_testcase { * Ensure that the contextlist_collection is countable. * * @covers ::count - * @covers :: */ public function test_countable() { $uit = new contextlist_collection(1); @@ -148,7 +142,6 @@ class contextlist_collection_test extends advanced_testcase { * @covers ::next * @covers ::rewind * @covers ::valid - * @covers :: */ public function test_iteration() { $uit = new contextlist_collection(1); @@ -184,7 +177,6 @@ class contextlist_collection_test extends advanced_testcase { * Test that the userid is correctly returned. * * @covers ::get_userid - * @covers :: */ public function test_get_userid() { $uit = new contextlist_collection(1); diff --git a/privacy/tests/contextlist_test.php b/privacy/tests/contextlist_test.php index 26bc701e950..13db8120a5b 100644 --- a/privacy/tests/contextlist_test.php +++ b/privacy/tests/contextlist_test.php @@ -42,7 +42,6 @@ class contextlist_test extends advanced_testcase { * Ensure that valid SQL results in the relevant contexts being added. * * @covers ::add_from_sql - * @covers :: */ public function test_add_from_sql() { global $DB; @@ -61,7 +60,6 @@ class contextlist_test extends advanced_testcase { * Ensure that valid system context id is added. * * @covers ::add_system_context - * @covers :: */ public function test_add_system_context() { $cl = new contextlist(); @@ -78,7 +76,6 @@ class contextlist_test extends advanced_testcase { * Ensure that a valid user context id is added. * * @covers ::add_user_context - * @covers :: */ public function test_add_user_context() { $this->resetAfterTest(); @@ -100,7 +97,6 @@ class contextlist_test extends advanced_testcase { * Ensure that valid user contexts are added. * * @covers ::add_user_contexts - * @covers :: */ public function test_add_user_contexts() { $this->resetAfterTest(); @@ -126,7 +122,6 @@ class contextlist_test extends advanced_testcase { * @param string $sql Input SQL we try to extract the context id field name from. * @param string $expected Expected detected value. * @covers ::guess_id_field_from_sql - * @covers :: */ public function test_guess_id_field_from_sql($sql, $expected) { diff --git a/privacy/tests/manager_test.php b/privacy/tests/manager_test.php index 633ecfe083d..eb1a0551df7 100644 --- a/privacy/tests/manager_test.php +++ b/privacy/tests/manager_test.php @@ -69,7 +69,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test collection of metadata for components implementing a metadata provider. * * @covers ::get_metadata_for_components - * @covers :: */ public function test_get_metadata_for_components() { // Get a mock manager, in which the core components list is mocked to include all mock plugins. @@ -93,7 +92,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that get_contexts_for_userid() only returns contextlist collections for core providers. * * @covers ::get_contexts_for_userid - * @covers :: */ public function test_get_contexts_for_userid() { // Get a mock manager, in which the core components list is mocked to include all mock plugins. @@ -121,7 +119,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test verifying the output of component_is_compliant. * * @covers ::component_is_compliant - * @covers :: */ public function test_component_is_compliant() { // Get a mock manager, in which the core components list is mocked to include all mock plugins. @@ -168,7 +165,6 @@ class privacy_manager_testcase extends advanced_testcase { * @param string $component * @param boolean $expected * @covers ::component_is_compliant - * @covers :: */ public function test_component_is_compliant_examples($component, $expected) { $manager = new \core_privacy\manager(); @@ -180,7 +176,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test verifying only approved contextlists can be used with the export_user_data method. * * @covers ::export_user_data - * @covers :: */ public function test_export_user_data() { // Get a mock manager, in which the core components list is mocked to include all mock plugins. @@ -216,7 +211,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test verifying only approved contextlists can be used with the delete_data_for_user method. * * @covers ::delete_data_for_user - * @covers :: */ public function test_delete_data_for_user() { $this->resetAfterTest(); @@ -250,7 +244,6 @@ class privacy_manager_testcase extends advanced_testcase { * This really just checks that all providers can be safely autoloaded. * * @covers ::get_metadata_for_components - * @covers :: */ public function test_installed_plugins() { $manager = new \core_privacy\manager(); @@ -262,7 +255,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that the reason for the null provider is returned. * * @covers ::get_null_provider_reason - * @covers :: */ public function test_get_null_provider_reason() { $manager = new \core_privacy\manager(); @@ -277,7 +269,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that manager::plugintype_class_callback() can be executed. * * @covers ::plugintype_class_callback - * @covers :: */ public function test_plugintype_class_callback() { \core_privacy\manager::plugintype_class_callback('doesnotexist', 'unusable', 'foo', ['bar']); @@ -287,7 +278,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that manager::component_class_callback() can be executed. * * @covers ::component_class_callback - * @covers :: */ public function test_component_class_callback() { \core_privacy\manager::component_class_callback('foo_bar', 'unusable', 'foo', ['bar']); @@ -300,7 +290,6 @@ class privacy_manager_testcase extends advanced_testcase { * @param string $component * @param bool $expected * @covers ::is_empty_subsystem - * @covers :: */ public function test_is_empty_subsystem($component, $expected) { $this->assertEquals($expected, \core_privacy\manager::is_empty_subsystem($component)); @@ -340,7 +329,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that get_contexts_for_userid() with a failing item. * * @covers ::get_contexts_for_userid - * @covers :: */ public function test_get_contexts_for_userid_with_failing() { // Get a mock manager, in which the core components list is mocked to include all mock plugins. @@ -378,7 +366,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that export_user_data() with a failing item. * * @covers ::export_user_data - * @covers :: */ public function test_export_user_data_with_failing() { $user = \core_user::get_user_by_username('admin'); @@ -414,7 +401,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that delete_data_for_user() with a failing item. * * @covers ::delete_data_for_user - * @covers :: */ public function test_delete_data_for_user_with_failing() { $user = \core_user::get_user_by_username('admin'); @@ -450,7 +436,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that delete_data_for_all_users_in_context() with a failing item. * * @covers ::delete_data_for_all_users_in_context - * @covers :: */ public function test_delete_data_for_all_users_in_context_with_failing() { $user = \core_user::get_user_by_username('admin'); @@ -481,7 +466,6 @@ class privacy_manager_testcase extends advanced_testcase { * Test that get_metadata_for_components() with a failing item. * * @covers ::get_metadata_for_components - * @covers :: */ public function test_get_metadata_for_components_with_failing() { $user = \core_user::get_user_by_username('admin'); diff --git a/privacy/tests/moodle_content_writer_test.php b/privacy/tests/moodle_content_writer_test.php index 84824c5e27c..57ada559950 100644 --- a/privacy/tests/moodle_content_writer_test.php +++ b/privacy/tests/moodle_content_writer_test.php @@ -45,7 +45,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider export_data_provider * @param \stdClass $data Data * @covers ::export_data - * @covers :: */ public function test_export_data($data) { $context = \context_system::instance(); @@ -71,7 +70,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider export_data_provider * @param \stdClass $data Data * @covers ::export_data - * @covers :: */ public function test_export_data_different_context($data) { $context = \context_user::instance(\core_user::get_user_by_username('admin')->id); @@ -95,7 +93,6 @@ class moodle_content_writer_test extends advanced_testcase { * Test that exported is saved within the correct directory locations. * * @covers ::export_data - * @covers :: */ public function test_export_data_writes_to_multiple_context() { $subcontext = ['sub', 'context']; @@ -140,7 +137,6 @@ class moodle_content_writer_test extends advanced_testcase { * Test that multiple writes to the same location cause the latest version to be written. * * @covers ::export_data - * @covers :: */ public function test_export_data_multiple_writes_same_context() { $subcontext = ['sub', 'context']; @@ -197,7 +193,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $description Description * @covers ::export_metadata - * @covers :: */ public function test_export_metadata($key, $value, $description) { $context = \context_system::instance(); @@ -223,7 +218,6 @@ class moodle_content_writer_test extends advanced_testcase { * Test that metadata can be set additively. * * @covers ::export_metadata - * @covers :: */ public function test_export_metadata_additive() { $context = \context_system::instance(); @@ -260,7 +254,6 @@ class moodle_content_writer_test extends advanced_testcase { * Test that metadata can be set additively. * * @covers ::export_metadata - * @covers :: */ public function test_export_metadata_to_multiple_contexts() { $systemcontext = \context_system::instance(); @@ -339,7 +332,6 @@ class moodle_content_writer_test extends advanced_testcase { * Exporting a single stored_file should cause that file to be output in the files directory. * * @covers ::export_area_files - * @covers :: */ public function test_export_area_files() { $this->resetAfterTest(); @@ -446,7 +438,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $content Content * * @covers ::export_file - * @covers :: */ public function test_export_file($filearea, $itemid, $filepath, $filename, $content) { $this->resetAfterTest(); @@ -544,7 +535,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $desc Description * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_user($component, $key, $value, $desc) { $admin = \core_user::get_user_by_username('admin'); @@ -578,7 +568,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $desc Description * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_coursecat($component, $key, $value, $desc) { global $DB; @@ -613,7 +602,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $desc Description * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_course($component, $key, $value, $desc) { global $DB; @@ -649,7 +637,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $desc Description * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_module($component, $key, $value, $desc) { global $DB; @@ -686,7 +673,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $value Value * @param string $desc Description * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_block($component, $key, $value, $desc) { global $DB; @@ -718,7 +704,6 @@ class moodle_content_writer_test extends advanced_testcase { * files. * * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_block_multiple_instances() { $this->resetAfterTest(); @@ -781,7 +766,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $desc Description * * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_context_system($component, $key, $value, $desc) { $context = \context_system::instance(); @@ -806,7 +790,6 @@ class moodle_content_writer_test extends advanced_testcase { * User preferences can be exported against the system. * * @covers ::export_user_preference - * @covers :: */ public function test_export_multiple_user_preference_context_system() { $context = \context_system::instance(); @@ -841,7 +824,6 @@ class moodle_content_writer_test extends advanced_testcase { * User preferences can be exported against the system. * * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_replace() { $context = \context_system::instance(); @@ -905,7 +887,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider unescaped_unicode_export_provider * @param string $text * @covers ::export_data - * @covers :: */ public function test_export_data_unescaped_unicode($text) { $context = \context_system::instance(); @@ -933,7 +914,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider unescaped_unicode_export_provider * @param string $text * @covers ::export_metadata - * @covers :: */ public function test_export_metadata_unescaped_unicode($text) { $context = \context_system::instance(); @@ -962,7 +942,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider unescaped_unicode_export_provider * @param string $text * @covers ::export_related_data - * @covers :: */ public function test_export_related_data_unescaped_unicode($text) { $context = \context_system::instance(); @@ -990,7 +969,6 @@ class moodle_content_writer_test extends advanced_testcase { * @dataProvider unescaped_unicode_export_provider * @param string $text * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_unescaped_unicode($text) { $context = \context_system::instance(); @@ -1033,7 +1011,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $text * * @covers ::export_data - * @covers :: */ public function test_export_data_long_filename($longtext, $expected, $text) { $context = \context_system::instance(); @@ -1066,7 +1043,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $text * * @covers ::export_related_data - * @covers :: */ public function test_export_related_data_long_filename($longtext, $expected, $text) { $context = \context_system::instance(); @@ -1246,7 +1222,6 @@ class moodle_content_writer_test extends advanced_testcase { * @param string $input Raw text as stored in the database. * @param string $expectedoutput Expected output of URL rewriting. * @covers ::rewrite_pluginfile_urls - * @covers :: */ public function test_rewrite_pluginfile_urls($filearea, $itemid, $input, $expectedoutput) { diff --git a/privacy/tests/writer_test.php b/privacy/tests/writer_test.php index d37c4621fad..be8bb465cca 100644 --- a/privacy/tests/writer_test.php +++ b/privacy/tests/writer_test.php @@ -53,7 +53,6 @@ class writer_test extends advanced_testcase { * Test that calling with_context multiple times will return the same write instance. * * @covers ::with_context - * @covers :: */ public function test_with_context() { $writer = writer::with_context(\context_system::instance()); @@ -65,7 +64,6 @@ class writer_test extends advanced_testcase { * Test that calling with_context multiple times will return the same write instance. * * @covers ::with_context - * @covers :: */ public function test_with_context_different_context_same_instance() { $writer = writer::with_context(\context_system::instance()); @@ -77,7 +75,6 @@ class writer_test extends advanced_testcase { * Test that calling writer::reset() causes a new copy of the writer to be returned. * * @covers ::reset - * @covers :: */ public function test_reset() { $writer = writer::with_context(\context_system::instance()); @@ -90,7 +87,6 @@ class writer_test extends advanced_testcase { * Test that the export_user_preference calls the writer against the system context. * * @covers ::export_user_preference - * @covers :: */ public function test_export_user_preference_sets_system_context() { $writer = writer::with_context(\context_user::instance(\core_user::get_user_by_username('admin')->id));