MDL-81698 phpunit: Apply various fixes towards 1by1 execution
The changes here are heterogeneous: - Include stuff that is not available (other test has included it). Sometimes local to a unit test, others in setupBeforeClass() or globally, ... depends on every case. - Rename some tests (namespaces, test name, ...) towards getting it running. - Amend small bits here and there. Important note: I've left any "cosmetic" warning out from the changes, only a few errors (like long array syntax) have been fixed.
This commit is contained in:
@@ -16,6 +16,14 @@
|
||||
|
||||
namespace core\task;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
// We need to keep this here because there is a provider
|
||||
// needing \core\task\adhoc_test_task and cannot move it
|
||||
// to setUpBeforeClass() or similar. Whenever we allow to
|
||||
// autoload fixtures, this can be removed.
|
||||
require_once(__DIR__ . '/../fixtures/task_fixtures.php');
|
||||
|
||||
/**
|
||||
* This file contains the unit tests for the task manager.
|
||||
*
|
||||
@@ -26,10 +34,6 @@ namespace core\task;
|
||||
* @covers \core\task\manager
|
||||
*/
|
||||
final class manager_test extends \advanced_testcase {
|
||||
public static function setUpBeforeClass(): void {
|
||||
require_once(__DIR__ . '/../fixtures/task_fixtures.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* Data provider for test_get_candidate_adhoc_tasks.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user