Skip to content

Commit b702b42

Browse files
authored
Merge pull request #10 from ianikanov/patch-1
Validation errors for haveRecord method
2 parents 69d0e99 + d9f5c01 commit b702b42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Codeception/Module/Yii2.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,7 @@ public function haveRecord($model, $attributes = [])
574574
$record->setAttributes($attributes, false);
575575
$res = $record->save(false);
576576
if (!$res) {
577-
$this->fail("Record $model was not saved");
577+
$this->fail("Record $model was not saved: " . \yii\helpers\Json::encode($record->errors));
578578
}
579579
return $record->primaryKey;
580580
}

0 commit comments

Comments
 (0)