SimpleTest conversion
From MoodleDocs
Overview
The migration is pretty straightforward:
- create new test file in `xxx/tests/yyy_test.php`
- copy contents of the old test file
- replace
extends UnitTestCase
withextends basic_testcase
andextends UnitTestCaseUsingDatabase
withextends advanced_testcase
- move constructor code to setUp
- fix setUp(), tearDown()
- fix assert syntax
- add $this->resetAfterTest() in advanced test cases that modify database