-
Improvement
-
Resolution: Fixed
-
Minor
-
3.9
-
MOODLE_39_STABLE
-
MOODLE_39_STABLE
-
MDL-68656-master -
Some issues with unit tests in quizaccess_seb were identified as part of MDL-68654
1) Forcing $this->resetAfterTest() and generator->create_course() in quizaccess_seb_testcase->setUp(). That code should be the nearest possible to the unit test. Right now, every unit test that we want to write will force, always, a database reset and the creation of a course, when we may be, perfectly, covering some method not requiring any of them.
2) Creating a parent quizaccess_seb_testcase itself, without any unit test (test_xxx) method... is prone to errors. If tomorrow anybody wants to create a unit test and adds it to that class... those tests will be executed X times, child classes will run it again and again. That should be a helper/fixtures or anything else, not a testcase.
3) BTW, also, we discovered yesterday... that the path for all those tests are really wrong (tests/phpunit). "phpunit" is not valid at all. Not sure if this has been reported in another issue, I just remember it because yesterday we were all surprised that we missed that detail.
- has been marked as being related by
-
MDL-68654 Windows automated tests failures (quizaccess_seb related)
-
- Closed
-