Skip to content

Commit

Permalink
Fix for support of Instance::of() in configuration (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonovsky authored Dec 21, 2020
1 parent 536ecb4 commit ac59fe6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Codeception/Lib/Connector/Yii2.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ public function startApp()
$config['class'] = 'yii\web\Application';
}

if (isset($config['container']))
{
Yii::configure(Yii::$container, $config['container']);
unset($config['container']);
}

$config = $this->mockMailer($config);
/** @var \yii\web\Application $app */
Yii::$app = Yii::createObject($config);
Expand Down

0 comments on commit ac59fe6

Please sign in to comment.