Browse files

MDL-37086 phpunit: use alt reset method.

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.
  • Loading branch information...
1 parent 502e785 commit 7356e732b7daaaccaf6aed3e0f8abd028e7c0821 @stronk7 stronk7 committed Jan 28, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 message/tests/externallib_test.php
@@ -62,6 +62,8 @@ public function test_send_instant_messages() {
global $DB, $USER, $CFG;
+ // 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');

0 comments on commit 7356e73

Please sign in to comment.