diff --git a/admin/tool/brickfield/tests/activityresults_test.php b/admin/tool/brickfield/tests/local/tool/activityresults_test.php
similarity index 100%
rename from admin/tool/brickfield/tests/activityresults_test.php
rename to admin/tool/brickfield/tests/local/tool/activityresults_test.php
diff --git a/admin/tool/brickfield/tests/checktyperesults_test.php b/admin/tool/brickfield/tests/local/tool/checktyperesults_test.php
similarity index 100%
rename from admin/tool/brickfield/tests/checktyperesults_test.php
rename to admin/tool/brickfield/tests/local/tool/checktyperesults_test.php
diff --git a/admin/tool/brickfield/tests/errors_test.php b/admin/tool/brickfield/tests/local/tool/errors_test.php
similarity index 100%
rename from admin/tool/brickfield/tests/errors_test.php
rename to admin/tool/brickfield/tests/local/tool/errors_test.php
diff --git a/admin/tool/brickfield/tests/printable_test.php b/admin/tool/brickfield/tests/local/tool/printable_test.php
similarity index 100%
rename from admin/tool/brickfield/tests/printable_test.php
rename to admin/tool/brickfield/tests/local/tool/printable_test.php
diff --git a/admin/tool/httpsreplace/tests/httpsreplace_test.php b/admin/tool/httpsreplace/tests/httpsreplace_test.php
index afc5cac9d0e..dcf3c221d2d 100644
--- a/admin/tool/httpsreplace/tests/httpsreplace_test.php
+++ b/admin/tool/httpsreplace/tests/httpsreplace_test.php
@@ -22,8 +22,7 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-namespace tool_httpsreplace\tests;
-
+namespace tool_httpsreplace;
defined('MOODLE_INTERNAL') || die();
diff --git a/admin/tool/moodlenet/tests/import_handler_info_test.php b/admin/tool/moodlenet/tests/local/import_handler_info_test.php
similarity index 95%
rename from admin/tool/moodlenet/tests/import_handler_info_test.php
rename to admin/tool/moodlenet/tests/local/import_handler_info_test.php
index 59f2db80e37..8535be29a33 100644
--- a/admin/tool/moodlenet/tests/import_handler_info_test.php
+++ b/admin/tool/moodlenet/tests/local/import_handler_info_test.php
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for the import_handler_info class.
- *
- * @package tool_moodlenet
- * @category test
- * @copyright 2020 Jake Dallimore
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace tool_moodlenet\local\tests;
+namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_info;
use tool_moodlenet\local\import_strategy;
use tool_moodlenet\local\import_strategy_file;
-defined('MOODLE_INTERNAL') || die();
-
/**
* Class tool_moodlenet_import_handler_info_testcase, providing test cases for the import_handler_info class.
+ *
+ * @package tool_moodlenet
+ * @category test
+ * @copyright 2020 Jake Dallimore
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_handler_info_test extends \advanced_testcase {
diff --git a/admin/tool/moodlenet/tests/import_handler_registry_test.php b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php
similarity index 97%
rename from admin/tool/moodlenet/tests/import_handler_registry_test.php
rename to admin/tool/moodlenet/tests/local/import_handler_registry_test.php
index 957f9db40aa..0c679515f03 100644
--- a/admin/tool/moodlenet/tests/import_handler_registry_test.php
+++ b/admin/tool/moodlenet/tests/local/import_handler_registry_test.php
@@ -14,15 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for the import_handler_registry class.
- *
- * @package tool_moodlenet
- * @category test
- * @copyright 2020 Jake Dallimore
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace tool_moodlenet\local\tests;
+namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_registry;
use tool_moodlenet\local\import_handler_info;
@@ -31,10 +23,13 @@ use tool_moodlenet\local\import_strategy_link;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
-defined('MOODLE_INTERNAL') || die();
-
/**
* Class tool_moodlenet_import_handler_registry_testcase, providing test cases for the import_handler_registry class.
+ *
+ * @package tool_moodlenet
+ * @category test
+ * @copyright 2020 Jake Dallimore
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_handler_registry_test extends \advanced_testcase {
diff --git a/admin/tool/moodlenet/tests/import_info_test.php b/admin/tool/moodlenet/tests/local/import_info_test.php
similarity index 96%
rename from admin/tool/moodlenet/tests/import_info_test.php
rename to admin/tool/moodlenet/tests/local/import_info_test.php
index 40731d9bdc0..754fbbce8f1 100644
--- a/admin/tool/moodlenet/tests/import_info_test.php
+++ b/admin/tool/moodlenet/tests/local/import_info_test.php
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for the import_info class.
- *
- * @package tool_moodlenet
- * @category test
- * @copyright 2020 Jake Dallimore
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace tool_moodlenet\local\tests;
+namespace tool_moodlenet\local;
use tool_moodlenet\local\import_info;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
-defined('MOODLE_INTERNAL') || die();
-
/**
* Class tool_moodlenet_import_info_testcase, providing test cases for the import_info class.
+ *
+ * @package tool_moodlenet
+ * @category test
+ * @copyright 2020 Jake Dallimore
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_info_test extends \advanced_testcase {
diff --git a/admin/tool/moodlenet/tests/import_processor_test.php b/admin/tool/moodlenet/tests/local/import_processor_test.php
similarity index 98%
rename from admin/tool/moodlenet/tests/import_processor_test.php
rename to admin/tool/moodlenet/tests/local/import_processor_test.php
index 3721a68ca9c..26f73f668b1 100644
--- a/admin/tool/moodlenet/tests/import_processor_test.php
+++ b/admin/tool/moodlenet/tests/local/import_processor_test.php
@@ -14,15 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for the import_processor class.
- *
- * @package tool_moodlenet
- * @category test
- * @copyright 2020 Jake Dallimore
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-namespace tool_moodlenet\local\tests;
+namespace tool_moodlenet\local;
use tool_moodlenet\local\import_handler_registry;
use tool_moodlenet\local\import_processor;
@@ -31,10 +23,13 @@ use tool_moodlenet\local\import_strategy_link;
use tool_moodlenet\local\remote_resource;
use tool_moodlenet\local\url;
-defined('MOODLE_INTERNAL') || die();
-
/**
* Class tool_moodlenet_import_processor_testcase, providing test cases for the import_processor class.
+ *
+ * @package tool_moodlenet
+ * @category test
+ * @copyright 2020 Jake Dallimore
+ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class import_processor_test extends \advanced_testcase {
diff --git a/admin/tool/moodlenet/tests/remote_resource_test.php b/admin/tool/moodlenet/tests/local/remote_resource_test.php
similarity index 96%
rename from admin/tool/moodlenet/tests/remote_resource_test.php
rename to admin/tool/moodlenet/tests/local/remote_resource_test.php
index cafab446f3f..500f95af4b2 100644
--- a/admin/tool/moodlenet/tests/remote_resource_test.php
+++ b/admin/tool/moodlenet/tests/local/remote_resource_test.php
@@ -14,24 +14,19 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+namespace tool_moodlenet\local;
+
+use tool_moodlenet\local\remote_resource;
+use tool_moodlenet\local\url;
+
/**
- * Unit tests for the remote_resource class.
+ * Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-namespace tool_moodlenet\local\tests;
-
-use tool_moodlenet\local\remote_resource;
-use tool_moodlenet\local\url;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Class tool_moodlenet_remote_resource_testcase, providing test cases for the remote_resource class.
- */
class remote_resource_test extends \advanced_testcase {
/**
diff --git a/admin/tool/moodlenet/tests/url_test.php b/admin/tool/moodlenet/tests/local/url_test.php
similarity index 96%
rename from admin/tool/moodlenet/tests/url_test.php
rename to admin/tool/moodlenet/tests/local/url_test.php
index 545e3ff5121..f48c0701140 100644
--- a/admin/tool/moodlenet/tests/url_test.php
+++ b/admin/tool/moodlenet/tests/local/url_test.php
@@ -14,23 +14,18 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+namespace tool_moodlenet\local;
+
+use tool_moodlenet\local\url;
+
/**
- * Unit tests for the url class.
+ * Class tool_moodlenet_url_testcase, providing test cases for the url class.
*
* @package tool_moodlenet
* @category test
* @copyright 2020 Jake Dallimore
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-namespace tool_moodlenet\local\tests;
-
-use tool_moodlenet\local\url;
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * Class tool_moodlenet_url_testcase, providing test cases for the url class.
- */
class url_test extends \advanced_testcase {
/**
diff --git a/blocks/accessreview/tests/accessibility_review_test.php b/blocks/accessreview/tests/accessibility_review_test.php
index cf21466bc46..ac667b66032 100644
--- a/blocks/accessreview/tests/accessibility_review_test.php
+++ b/blocks/accessreview/tests/accessibility_review_test.php
@@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-namespace block_accessreview\tests;
+namespace block_accessreview;
use ReflectionClass;
use advanced_testcase;
diff --git a/grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_fetch_test.php b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php
similarity index 97%
rename from grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_fetch_test.php
rename to grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php
index 46f62b455db..cb86d137668 100644
--- a/grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_fetch_test.php
+++ b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/fetch_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package gradingform_guide
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace gradingform_guide\grades\grader\gradingpanel\external;
@@ -42,7 +33,7 @@ use moodle_exception;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_guide_external_fetch_test extends advanced_testcase {
+class fetch_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_store_test.php b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php
similarity index 96%
rename from grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_store_test.php
rename to grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php
index f2bf5f33e26..5d649941608 100644
--- a/grade/grading/form/guide/tests/grades_grader_gradingpanel_guide_external_store_test.php
+++ b/grade/grading/form/guide/tests/grades/grader/gradingpanel/external/store_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package gradingform_guide
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace gradingform_guide\grades\grader\gradingpanel\external;
@@ -42,7 +33,7 @@ use moodle_exception;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_guide_external_store_test extends advanced_testcase {
+class store_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_fetch_test.php b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php
similarity index 97%
rename from grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_fetch_test.php
rename to grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php
index 42839ecb67b..68402617c40 100644
--- a/grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_fetch_test.php
+++ b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/fetch_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package gradingform_rubric
- * @category test
- * @copyright 2019 Mathew May
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace gradingform_rubric\grades\grader\gradingpanel\external;
@@ -43,7 +34,7 @@ use moodle_exception;
* @copyright 2019 Mathew May
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_rubric_external_fetch_test extends advanced_testcase {
+class fetch_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_store_test.php b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php
similarity index 96%
rename from grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_store_test.php
rename to grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php
index ca6bfb209e7..f911134b18e 100644
--- a/grade/grading/form/rubric/tests/grades_grader_gradingpanel_rubric_external_store_test.php
+++ b/grade/grading/form/rubric/tests/grades/grader/gradingpanel/external/store_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package gradingform_rubric
- * @category test
- * @copyright 2019 Mathew May
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace gradingform_rubric\grades\grader\gradingpanel\external;
@@ -42,7 +33,7 @@ use moodle_exception;
* @copyright 2019 Mathew May
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_rubric_external_store_test extends advanced_testcase {
+class store_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/tests/component_gradeitems_test.php b/grade/tests/component_gradeitems_test.php
index a84e5774f52..a37c22d01c2 100644
--- a/grade/tests/component_gradeitems_test.php
+++ b/grade/tests/component_gradeitems_test.php
@@ -25,7 +25,7 @@
declare(strict_types = 1);
-namespace tests\core_grades {
+namespace core_grades {
use advanced_testcase;
use core_grades\component_gradeitems;
diff --git a/grade/tests/grades_grader_gradingpanel_point_external_fetch_test.php b/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php
similarity index 96%
rename from grade/tests/grades_grader_gradingpanel_point_external_fetch_test.php
rename to grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php
index 14104cb5e01..282d04b399a 100644
--- a/grade/tests/grades_grader_gradingpanel_point_external_fetch_test.php
+++ b/grade/tests/grades/grader/gradingpanel/point/external/fetch_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package core_grades
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace core_grades\grades\grader\gradingpanel\point\external;
@@ -42,7 +33,7 @@ use moodle_exception;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_point_external_fetch_test extends advanced_testcase {
+class fetch_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/tests/grades_grader_gradingpanel_point_external_store_test.php b/grade/tests/grades/grader/gradingpanel/point/external/store_test.php
similarity index 97%
rename from grade/tests/grades_grader_gradingpanel_point_external_store_test.php
rename to grade/tests/grades/grader/gradingpanel/point/external/store_test.php
index bc6a31e7b07..183d2ea8c96 100644
--- a/grade/tests/grades_grader_gradingpanel_point_external_store_test.php
+++ b/grade/tests/grades/grader/gradingpanel/point/external/store_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package core_grades
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace core_grades\grades\grader\gradingpanel\point\external;
@@ -44,7 +35,7 @@ use grade_item;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_point_external_store_test extends advanced_testcase {
+class store_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/tests/grades_grader_gradingpanel_scale_external_fetch_test.php b/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php
similarity index 97%
rename from grade/tests/grades_grader_gradingpanel_scale_external_fetch_test.php
rename to grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php
index ffb99a299b8..a4bb51a82da 100644
--- a/grade/tests/grades_grader_gradingpanel_scale_external_fetch_test.php
+++ b/grade/tests/grades/grader/gradingpanel/scale/external/fetch_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package core_grades
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace core_grades\grades\grader\gradingpanel\scale\external;
@@ -42,7 +33,7 @@ use moodle_exception;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_scale_external_fetch_test extends advanced_testcase {
+class fetch_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/grade/tests/grades_grader_gradingpanel_scale_external_store_test.php b/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php
similarity index 98%
rename from grade/tests/grades_grader_gradingpanel_scale_external_store_test.php
rename to grade/tests/grades/grader/gradingpanel/scale/external/store_test.php
index 066ab6b5b60..96a0d8fc558 100644
--- a/grade/tests/grades_grader_gradingpanel_scale_external_store_test.php
+++ b/grade/tests/grades/grader/gradingpanel/scale/external/store_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for core_grades\component_gradeitems;
- *
- * @package core_grades
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace core_grades\grades\grader\gradingpanel\scale\external;
@@ -44,7 +35,7 @@ use grade_item;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_grader_gradingpanel_scale_external_store_test extends advanced_testcase {
+class store_test extends advanced_testcase {
public static function setupBeforeClass(): void {
global $CFG;
diff --git a/h5p/tests/h5p_file_storage_test.php b/h5p/tests/file_storage_test.php
similarity index 99%
rename from h5p/tests/h5p_file_storage_test.php
rename to h5p/tests/file_storage_test.php
index 562fd4c941d..e81e804facf 100644
--- a/h5p/tests/h5p_file_storage_test.php
+++ b/h5p/tests/file_storage_test.php
@@ -14,16 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Testing the H5P H5PFileStorage interface implementation.
- *
- * @package core_h5p
- * @category test
- * @copyright 2019 Victor Deniz
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
-namespace core_h5p\local\tests;
+namespace core_h5p;
use core_h5p\file_storage;
use core_h5p\local\library\autoloader;
@@ -38,11 +29,12 @@ use zip_archive;
* Test class covering the H5PFileStorage interface implementation.
*
* @package core_h5p
+ * @category test
* @copyright 2019 Victor Deniz
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @runTestsInSeparateProcesses
*/
-class h5p_file_storage_test extends \advanced_testcase {
+class file_storage_test extends \advanced_testcase {
/** @var \core_h5p\file_storage H5P file storage instance */
protected $h5p_file_storage;
diff --git a/lib/tests/completion_daily_task_test.php b/lib/tests/task/completion_daily_task_test.php
similarity index 96%
rename from lib/tests/completion_daily_task_test.php
rename to lib/tests/task/completion_daily_task_test.php
index baba7825ef7..fde8a40eaa9 100644
--- a/lib/tests/completion_daily_task_test.php
+++ b/lib/tests/task/completion_daily_task_test.php
@@ -14,14 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Contains the class containing unit tests for the daily completion cron task.
- *
- * @package core
- * @copyright 2020 Jun Pataleta
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
namespace core\task;
use advanced_testcase;
diff --git a/lib/tests/task_manager_test.php b/lib/tests/task/manager_test.php
similarity index 97%
rename from lib/tests/task_manager_test.php
rename to lib/tests/task/manager_test.php
index b3007e9a265..4864369e97f 100644
--- a/lib/tests/task_manager_test.php
+++ b/lib/tests/task/manager_test.php
@@ -14,23 +14,20 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
+namespace core\task;
+
+defined('MOODLE_INTERNAL') || die();
+require_once(__DIR__ . '/../fixtures/task_fixtures.php');
+
/**
* This file contains the unit tests for the task manager.
*
* @package core
+ * @category test
* @copyright 2019 Brendan Heywood
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-
-defined('MOODLE_INTERNAL') || die();
-
-/**
- * This file contains the unit tests for the task manager.
- *
- * @copyright 2019 Brendan Heywood
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-class core_task_manager_testcase extends advanced_testcase {
+class manager_test extends \advanced_testcase {
public function test_ensure_adhoc_task_qos_provider() {
return [
@@ -194,4 +191,3 @@ class core_task_manager_testcase extends advanced_testcase {
}
}
-
diff --git a/lib/tests/task_running_test.php b/lib/tests/task/running_test.php
similarity index 94%
rename from lib/tests/task_running_test.php
rename to lib/tests/task/running_test.php
index 378101caf82..0cfb91e0a49 100644
--- a/lib/tests/task_running_test.php
+++ b/lib/tests/task/running_test.php
@@ -14,28 +14,21 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * This file contains unit tests for the 'task running' data.
- *
- * @package core
- * @copyright 2019 The Open University
- * @copyright 2020 Mikhail Golenkov
- * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
- */
-
namespace core\task;
defined('MOODLE_INTERNAL') || die();
-require_once(__DIR__ . '/fixtures/task_fixtures.php');
+require_once(__DIR__ . '/../fixtures/task_fixtures.php');
/**
* This file contains unit tests for the 'task running' data.
*
+ * @package core
+ * @category test
* @copyright 2019 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class task_running_test extends \advanced_testcase {
+class running_test extends \advanced_testcase {
/**
* Test for ad-hoc tasks.
diff --git a/mod/forum/tests/grades_forum_gradeitem_test.php b/mod/forum/tests/grade/forum_gradeitem_test.php
similarity index 97%
rename from mod/forum/tests/grades_forum_gradeitem_test.php
rename to mod/forum/tests/grade/forum_gradeitem_test.php
index a7da3930c25..be983a73135 100644
--- a/mod/forum/tests/grades_forum_gradeitem_test.php
+++ b/mod/forum/tests/grade/forum_gradeitem_test.php
@@ -30,7 +30,9 @@ use mod_forum\local\entities\forum as forum_entity;
use gradingform_controller;
use mod_forum\grades\forum_gradeitem;
-require_once(__DIR__ . '/generator_trait.php');
+defined('MOODLE_INTERNAL') || die();
+
+require_once(__DIR__ . '/../generator_trait.php');
/**
* Tests for the the Forum gradeitem.
@@ -39,7 +41,7 @@ require_once(__DIR__ . '/generator_trait.php');
* @copyright Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_forum_gradeitem_test extends \advanced_testcase {
+class forum_gradeitem_test extends \advanced_testcase {
use \mod_forum_tests_generator_trait;
/**
diff --git a/mod/forum/tests/grades_gradeitems_test.php b/mod/forum/tests/grade/gradeitems_test.php
similarity index 91%
rename from mod/forum/tests/grades_gradeitems_test.php
rename to mod/forum/tests/grade/gradeitems_test.php
index d3e2321bef0..404791ac8a4 100644
--- a/mod/forum/tests/grades_gradeitems_test.php
+++ b/mod/forum/tests/grade/gradeitems_test.php
@@ -14,15 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see .
-/**
- * Unit tests for mod_forum\grades\gradeitems.
- *
- * @package mod_forum
- * @category test
- * @copyright 2019 Andrew Nicols
- * @license http://www.gnu.org/copyleft/gpl.html GNU Public License
- */
-
declare(strict_types = 1);
namespace mod_forum\grade;
@@ -39,7 +30,7 @@ use coding_exception;
* @copyright 2019 Andrew Nicols
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-class grades_gradeitems_test extends advanced_testcase {
+class gradeitems_test extends advanced_testcase {
/**
* Ensure that the mappings are present and correct.
diff --git a/mod/lti/tests/openidregistration_test.php b/mod/lti/tests/local/ltiopenid/registration_test.php
similarity index 98%
rename from mod/lti/tests/openidregistration_test.php
rename to mod/lti/tests/local/ltiopenid/registration_test.php
index dc266bc68dd..d700a6570f6 100644
--- a/mod/lti/tests/openidregistration_test.php
+++ b/mod/lti/tests/local/ltiopenid/registration_test.php
@@ -32,22 +32,17 @@
// of the Universitat Politecnica de Catalunya http://www.upc.edu
// Contact info: Marc Alier Forment granludo @ gmail.com or marc.alier @ upc.edu.
+namespace mod_lti\local\ltiopenid;
+
/**
- * This file contains unit tests for lti/openidregistrationlib.php
+ * OpenId LTI Registration library tests
*
* @package mod_lti
* @copyright 2020 Claude Vervoort, Cengage
* @author Claude Vervoort
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
-namespace mod_lti\local\ltiopenid;
-use mod_lti\local\ltiopenid\registration_exception;
-use mod_lti\local\ltiopenid\registration_helper;
-
-/**
- * OpenId LTI Registration library tests
- */
-class openidregistration_test extends \advanced_testcase {
+class registration_test extends \advanced_testcase {
/**
* @var string A has-it-all client registration.