6 Commits

Author SHA1 Message Date
Andrew Nicols
7bb9f136d2
MDL-81520 core: Fix test finality 2024-12-11 12:30:21 +08:00
Eloy Lafuente (stronk7)
01148a0816
MDL-81522 phpunit: Add missing void return type to all tests
While this change is not 100% required now, it's good habit
and we are checking for it since Moodle 4.4.

All the changes in this commit have been applied automatically
using the moodle.PHPUnit.TestReturnType sniff and are, exclusively
adding the ": void" return types when missing.
2024-06-11 11:55:07 +02: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
Damyon Wiese
9c91a9593d MDL-57273 core: Remove magic setters and getters
Remove the magic getters and setters from persistent. They are deprecated only in the persistent
class for competencies.
2017-01-20 12:56:19 +08:00
Frederic Massart
5a1a685c28 MDL-53700 competency: Migrating events to core
Leaving comments behind for now as it's a tricky one.
2016-04-18 11:05:59 +08:00
Frederic Massart
e0b9ba28a4 MDL-53700 competency: Migrating tests to core 2016-04-18 11:05:59 +08:00