Affects Version/s: 3.6.6, 3.7, 3.8
Fix Version/s: None
Component/s: Unit tests
Affected Branches:MOODLE_36_STABLE, MOODLE_37_STABLE, MOODLE_38_STABLE
MDLSITE-4800 decided now we can start using namespaces within **/tests directories in an organized way
There are various stuff that can be found there:
- phpunit test cases.
- behat steps
Given the agreement about namespaces... maybe we should consider to make the proper APIs, so they can be used as level2 namespace (\mod_forum\generator\...).
Alternative (not needing them being APIs) would be to move the to 3rd level, under local, where we have freedom. (\mod_forum\local\generators)
And also, there is the already existing "tests" API, so we can use it too (\mod_forum\tests\generator).
Note it's not mandatory to move all them to namespaces, neither implement their autoloading. But we need to provide/allow the details the agreement defines.
So this is about consider which alternative we follow and how we provide autoloading for them. Importantly... test cases themselves don't need autoloading (phpunit's finder finds them no matter the namespace).