We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf51d41 commit c1298a8Copy full SHA for c1298a8
src/Codeception/Module/Yii2.php
@@ -486,7 +486,7 @@ protected function getModelRecord($model)
486
if (!class_exists($model)) {
487
throw new \RuntimeException("Model $model does not exist");
488
}
489
- $record = new $model;
+ $record = Yii::createObject($model);
490
if (!$record instanceof ActiveRecordInterface) {
491
throw new \RuntimeException("Model $model is not implement interface \\yii\\db\\ActiveRecordInterface");
492
0 commit comments