Commit Graph

5 Commits

Author SHA1 Message Date
Tim Hunt e52dbcdef4 MDL-77611 tool_uploaduser: fix phpunit assumptions about profile fields 2023-03-13 13:31:33 +00:00
Meirza e2d5d50276 MDL-77336 admin: Added class properties that are not declared.
In PHP 8.2 and later, setting a value to an undeclared class property is
deprecated and emits a deprecation notice.
So we need to add missing class properties that still need to be declared.
2023-03-06 16:44:06 +07:00
Eloy Lafuente (stronk7) 9f53b0e965 MDL-73971 phpunit: Move more tests to use correct names and namespaces
Applied the following changes to various testcase classes:

- Namespaced with component[\level2-API]
- Moved to level2-API subdirectory when required.
- Fixed incorrect use statements with leading backslash.
- Remove file phpdoc block
- Remove MOODLE_INTERNAL if not needed.
- Changed code to point to global scope when needed.
- Fix some relative paths and comments here and there.
- All them passing individually.
- Complete runs passing too.

Special mention to:

- Some fixtures, initially defined in the test files have been
  moved to new files in fixtures subdirectory, leaving the unit
  test files clearer:
  - moodle2_course_format_test.php
- Rename wrong named test:
  - baseoptiogroup_test = baseoptigroup_test
2022-05-06 18:29:11 +02:00
Marina Glancy ef3d6a3d70 MDL-71051 core_user: use user profile generator in all tests 2021-04-28 11:47:21 +02:00
Marina Glancy 7a9c8cbd3e MDL-65451 tool_uploaduser: move code away from index.php, add CLI script 2020-10-06 15:54:09 +02:00