mirror of
https://github.com/moodle/moodle.git
synced 2025-08-02 07:39:54 +02:00
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:
parent
80f521eed0
commit
b2a485e244
18 changed files with 96 additions and 49 deletions
|
@ -269,8 +269,6 @@ class question_test extends \advanced_testcase {
|
|||
|
||||
$this->resetAfterTest();
|
||||
|
||||
$qtype = new qtype_calculated();
|
||||
|
||||
// Create a question.
|
||||
$q = \test_question_maker::get_question_data('calculated', 'mult');
|
||||
$q->id = 99;
|
||||
|
@ -284,6 +282,7 @@ class question_test extends \advanced_testcase {
|
|||
$units[] = $unit;
|
||||
$DB->insert_records("question_numerical_units", $units);
|
||||
|
||||
$qtype = new qtype_calculated();
|
||||
$qtypeobj = question_bank::get_qtype($qtype->name());
|
||||
$fakedata = ["a" => "5.7", "b" => "3.3"];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue