-
Bug
-
Resolution: Fixed
-
Low
-
None
Since October 2019 (MDLSITE-4800), these rules apply to control the use of namespaces within **/tests/ directories:
- The use of namespaces is recommended in testing stuff.
- Their 1st level namespace will match 100% the component they belong to.
- Sub-namespaces are allowed, strictly following the general namespace rules in moodle (APIs and local).
While I have been unable to find it, we have asked already a number of times for unit tests not to use namespaces. This is about try to ensure that's observed:
- Document it more clearly, right now there are 3 main pages (that, indeed may need a refactor, apart from this issue):
- Check for that in local_ci phpunit execution.
- Fix current violations.
$ ag '^namespace' | grep _test.php
lib/form/tests/external_test.php:26:namespace core_form;
lib/form/tests/filetypes_util_test.php:26:namespace core_form;
webservice/soap/tests/wsdl_test.php:25:namespace webservice_soap;
Ciao
- has a non-specific relationship to
-
MDLSITE-6370 Inconsistences in "test" vs "tests" core API / subsystem
- Open
- has been marked as being related by
-
CONTRIB-8400 Inclusion of lib.php has side effects
- Closed
-
MDL-66748 Create data generator for core grading + rubric
- Closed
-
MDL-53240 Form element and admin setting type to choose file types and type groups
- Closed
-
MDL-62577 Allow rerun command to work with namespaced tests
- Closed