Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsoriano authored Mar 9, 2024
1 parent b864b2a commit 90a3712
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/Support/SupportCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4606,20 +4606,21 @@ public function testDump($collection)
VarDumper::setHandler(null);
}

/**
* @dataProvider collectionClassProvider
*/
public function testDumpArray($collection)
{
$log = new Collection;
VarDumper::setHandler(function ($value) use ($log) {
$log->add($value);
});

$collection = new Collection([
(new $collection([
'one',
(new Model())->forceFill(['id' => 2]),
3,
]);

$collection->dumpArray(
]))->dumpArray(
(new Model())->forceFill(['id' => 4]),
'five',
);
Expand Down

0 comments on commit 90a3712

Please sign in to comment.