MDL-73785 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:

- When belonging to other components and being valid api:
  - analytics related tests have been moved to tests/analytics subdir.
  - backup & restore related tests have been moved to tests/backup subdir.
  - events related tests have been moved to tests/event subdir.
  - privacy related tests have been moved to tests/privacy.
  - task related tests have been moved to tests/task subdir.
- Some simple renames, not including the component part anymore (not
  needed now that they are namespaced):
  - some xxxlib_test.php have been renamed lib_test.php
    (when they where testing the corresponding lib.php).
  - cache stores tests have been all renamed store_test, originally
    each one had its own name (file_test, apcu_test, redis_test...)
  - assign feedback tests have been all renamed feedback_test, originally
    each one had its own name (file_test, editpdf_test...)
This commit is contained in:
Eloy Lafuente (stronk7)
2022-03-03 12:19:38 +01:00
parent 646c691107
commit eb0c520ad6
86 changed files with 1304 additions and 1707 deletions
+4 -11
View File
@@ -14,24 +14,17 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Provides the {@link mlbackend_python_processor_testcase} class.
*
* @package mlbackend_python
* @category test
* @copyright 2019 David Mudrák <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
namespace mlbackend_python;
/**
* Unit tests for the {@link \mlbackend_python\processor} class.
*
* @package mlbackend_python
* @category test
* @copyright 2019 David Mudrák <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class mlbackend_python_processor_testcase extends advanced_testcase {
class processor_test extends \advanced_testcase {
/**
* Test implementation of the {@link \mlbackend_python\processor::check_pip_package_version()} method.