Skip to content

Commit

Permalink
Merge c782761 into 52e2133
Browse files Browse the repository at this point in the history
  • Loading branch information
ytetsuro committed Jan 20, 2018
2 parents 52e2133 + c782761 commit 3633629
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,15 @@ class CIPHPUnitTestDbTestCase extends CIPHPUnitTestCase
*/
protected $insertCache = [];

public function resetInstance()
{
parent::resetInstance();
$this->loadDependencies();
}

protected function loadDependencies()
{
if ($this->db === null)
if ($this->db === null || $this->db->conn_id === false)
{
$CI =& get_instance();
$CI->load->database();
Expand Down

0 comments on commit 3633629

Please sign in to comment.