Skip to content

Commit

Permalink
Fix callAfterCreating for one entity in FactoryBuilder::create
Browse files Browse the repository at this point in the history
  • Loading branch information
zergbz1988 authored Mar 27, 2020
1 parent d2943d1 commit f232a0f
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 f232a0f

Please sign in to comment.