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 a9c75fd commit f1b7893d57654171fb9bef9f409c339cf3cc2305 @stronk7 stronk7 committed Jan 28, 2013
Showing with 2 additions and 0 deletions.
  1. +2 −0 message/tests/externallib_test.php
2 message/tests/externallib_test.php
@@ -40,6 +40,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 f1b7893

Please sign in to comment.