diff --git a/src/Asserts/EloquentAsserts.php b/src/Asserts/EloquentAsserts.php index 5ed8d4f..b4edc29 100644 --- a/src/Asserts/EloquentAsserts.php +++ b/src/Asserts/EloquentAsserts.php @@ -104,6 +104,11 @@ protected function assertEloquentHasCreateManyFor($class, $relation, $createMany ->toArray() ); + /* @laravel-versions */ + if (is_array($children)) { + $children = collect($children); + } + $this->assertCollectionsEqual($children, $parent->{$relation}, $childKey); }