Skip to content

Commit

Permalink
ITT: Made changes for an old Laravel versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitry-ivanov committed Mar 17, 2017
1 parent f09de15 commit d9b915c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Asserts/EloquentAsserts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit d9b915c

Please sign in to comment.