Skip to content

Commit

Permalink
Fixes Codeception#3916: Don't try to start transaction when working w…
Browse files Browse the repository at this point in the history
…ith non-transactional DBs (Codeception#3917)
  • Loading branch information
samdark authored and bulzgkri committed Jun 16, 2017
1 parent dc95037 commit 249f083
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Codeception/Module/Yii2.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public function _before(TestInterface $test)
$this->loadFixtures($test);
}

if ($this->config['cleanup'] && $this->app->has('db')) {
if ($this->config['cleanup'] && $this->app->has('db') && $this->app->db instanceof \yii\db\Connection) {
$this->transaction = $this->app->db->beginTransaction();
}
}
Expand Down

0 comments on commit 249f083

Please sign in to comment.