When code executed in test cases is using/preventing
database transactions, phpunit itself cannot
use transactions for reseting between cases. But we
can tell it about, so some alternative (and slower)
method for reseting will be used.
global $DB, $USER, $CFG;
$this->resetAfterTest(true);
+ // Transactions used in tests, tell phpunit use alternative reset method.
+ $this->preventResetByRollback();
// Turn off all message processors (so nothing is really sent)
require_once($CFG->dirroot . '/message/lib.php');