Skip to content

Commit

Permalink
Merge pull request #441 from zergbz1988/1.5
Browse files Browse the repository at this point in the history
[FIX] Fixed callAfterCreating for one entity in FactoryBuilder::create
  • Loading branch information
eigan authored Apr 1, 2020
2 parents d2943d1 + f232a0f commit b7e6b39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Testing/FactoryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public function create(array $attributes = [])

if ($this->amount === 1) {
$manager->persist($results);
$this->callAfterCreating(collect($results));
$this->callAfterCreating(collect([$results]));
} else {
foreach ($results as $result) {
$manager->persist($result);
Expand Down

0 comments on commit b7e6b39

Please sign in to comment.