Skip to content

Commit

Permalink
refactor: make test more precise
Browse files Browse the repository at this point in the history
  • Loading branch information
the-pulli committed Sep 22, 2023
1 parent aac785e commit a62c93b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
36 changes: 18 additions & 18 deletions tests/Macros/MapToCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,25 +73,25 @@
),
], true);

expect($data->toArray())->toEqual([
[
expect($data)->toEqual(new Collection([
new Collection([
'name' => 'parent1',
'children' => [
['name' => 'child1'],
],
'other' => [
['value' => 'other1'],
],
],
[
'children' => new Collection([
new Collection(['name' => 'child1']),
]),
'other' => new Collection([
new Collection(['value' => 'other1']),
]),
]),
new Collection([
'name' => 'parent2',
'children' => [
['name' => 'child2'],
],
'other' => [
['value' => 'other2'],
],
],
]);
'children' => new Collection([
new Collection(['name' => 'child2']),
]),
'other' => new Collection([
new Collection(['value' => 'other2']),
]),
]),
]));
});
});
2 changes: 1 addition & 1 deletion tests/Macros/RecursiveToArrayTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
),
]);

expect($data)->toEqual([
expect($data)->toBe([
[
'name' => 'parent1',
'children' => [
Expand Down

0 comments on commit a62c93b

Please sign in to comment.