Skip to content

Commit

Permalink
MDL-16486 Correctly overriding $DB at construct time.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Sep 18, 2008
1 parent 165d25c commit cb35244
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/simpletestlib.php
Expand Up @@ -169,6 +169,7 @@ public function __construct($label = false) {
global $DB, $CFG;
$this->pkfile = $CFG->dataroot.'/testtablespks.csv';
$this->cfg = $CFG;
$this->setup();

$tables = $DB->get_tables();

Expand Down Expand Up @@ -274,6 +275,7 @@ public function __destruct() {
$CFG = $this->cfg;
$this->truncate_test_tables($this->get_table_data($this->pkfile));
fulldelete($this->pkfile);
$this->tearDown();
}
}

Expand Down

0 comments on commit cb35244

Please sign in to comment.