Skip to content

Commit

Permalink
Merge pull request #11 from RonasIT/dpankratov/circular-relations-fix
Browse files Browse the repository at this point in the history
Dpankratov/circular relations fix
  • Loading branch information
DenTray authored Apr 18, 2022
2 parents dc04121 + 2c90986 commit 47b0927
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Generators/TestsGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ protected function buildRelationsTree($models)
continue;
}

if (in_array($this->model, $relations)) {
if (in_array($model, $relations)) {
$this->throwFailureException(
CircularRelationsFoundedException::class,
"Circular relations founded.",
"Please resolve you relations in models, factories and database."
'Circular relations founded.',
'Please resolve you relations in models, factories and database.'
);
}

Expand Down

0 comments on commit 47b0927

Please sign in to comment.