Skip to content

Commit

Permalink
MDL-37086 phpunit: use alt reset method.
Browse files Browse the repository at this point in the history
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
stronk7 committed Jan 28, 2013
1 parent 502e785 commit 7356e73
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions message/tests/externallib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ public function test_send_instant_messages() {
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');
Expand Down

0 comments on commit 7356e73

Please sign in to comment.